-1

We get a flash message after a call finished.I need to take the details and store into sqlite db. I need to get the duration and cost of that call from the flash message. Then how to take this information.

KIRAN K J
  • 632
  • 5
  • 28
  • 57

2 Answers2

3

You just use broadcast receivers to get the message. After that you have to parse the string to get the details like cost and time. But the main problem is different service providers have different format of flash messages. So you have to manage all these difficulties.

Zacharias Manuel
  • 8,983
  • 1
  • 17
  • 30
  • How/where to get the service of popup message?any idea? – KIRAN K J Feb 21 '12 at 13:29
  • is this useful for me [public abstract Object getSystemService (String name)](http://developer.android.com/reference/android/content/Context.html#getSystemService%28java.lang.String%29) – KIRAN K J Feb 21 '12 at 13:34
  • Did you try the SMS broadcast receiver? Try these links http://androidsourcecode.blogspot.in/2010/10/receiving-sms-using-broadcastreceiver.html http://stackoverflow.com/questions/4117701/android-sms-broadcast-receiver – Zacharias Manuel Feb 22 '12 at 03:00
1

If I understand you want to be notified when some call is finished for storing the information in a sqlite database, right?

You can use a BroadCastReceiver that notifies you when the call state changes, here a brief explanation.

I don't sure if with the broadcast you get all the call information, if not you can always open the call log content provider example

Hope it helps :)

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Jordi Coscolla
  • 1,066
  • 6
  • 8