I’m building an app that listen for changes in the CallLog.Calls content provider. So any changes on this content provider will notify the the app’s observer, that will insert the data has changed.
But there is a problem, the app is notified when its not running, ie, the app will not capture the data has changed while not running.
So my question is, is there a way to capture the data that changed while the app was not running? So, example, I made 8 calls, and the app was not running, so 8 new data has been added to the CallLog.calls content provider. So is there a way to capture this 8 new data once the application starts?
Thanks!
If there is an
Intentthat is fired on an incoming call you could get your app to respond by using aBroadcastReceiverand create anIntentFilterin your manifest.Or just query the provider when your app launches…
Edit:
ACTION_PHONE_STATE_CHANGEDis aTelephonyManagerintent you can listen for and check if it isTelephonyManager.CALL_STATE_RINGING.