0

So here I am learning Android.

I know there is plenty of tutorials on how to make call logs out there. But I'm planning on doing one also, but with the opportunity of calling someone by pressing the on object item.

So I was wondering on how to create this.. Make a list (ListView) out of the call log. Was thinking from this example: http://sunil-android.blogspot.se/2013/09/call-logs-in-android.html . And attach a listener on every item in the log list (I think I do this by just attach it on the list itself?). When pressing an item, make a call to the number attached to the item.

My question: How can I make a call to the favoured item by pressing on it?

jww
  • 97,681
  • 90
  • 411
  • 885
Alexein
  • 666
  • 1
  • 11
  • 19
  • this example is really bad 1. it will be better to use Loader and CursorAdapter for such things 2. even if you wana use POJOs, this ArrayAdapter's implementation is also bad (you should only change getView implemenatation and use getItem of base class instead direct acces to listdata or just use BaseAdapter a base class) ... 3. just because of point 2 you can't use normal way to get "clicked item" inside the listener ... ((CastToTheObject)adapterview.getitematposition(position)) ... even layout of item could be done better ... – Selvin Feb 24 '15 at 00:15
  • thanks, I'll have a look at this part after work, and tell you about it – Alexein Feb 24 '15 at 09:02

1 Answers1

1

The short answer is that you need to send an implicit intent to the phone app.

See this post: how to make phone call using intent in android?

Community
  • 1
  • 1
Daniel Nugent
  • 43,104
  • 15
  • 109
  • 137