On Wed, Sep 8, 2010 at 7:12 AM, KrcK --- <[email protected]> wrote: > The general idea is to create an app like incoming call log. So I have to > create a new register in my database when a new call is answered or lost.
Android has a CallLog already. It's called android.provider.CallLog. > To do that, I implement a BroadcastReceiver that reacts when the phone state > changes. In the onReceive method, I get the TelephonyManager and through > this I can get the call state (getCallSate method). There is also an Intent extra. > The problem here is that I can not know the previous state, so I can not > know if an incoming call was answered or not, while if I could get the > previous state, I would know it with the states transition. Why not use the existing CallLog? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

