Hi all,
I'm a total newbie to Android (and to Java in general... mostly a PERL/
PHP guy here...), so forgive me if I use the wrong terminology to
refer to things... I have been asked by my company to implement an
application for Android that allows a user to enter a note at the end
of every call.  E.g., either they or the other party hangs up,
immediately a notes area pops up with a "save" button and if they
enter a note, the note is saved with a reference to the call log
entry.  As I understand it, onCallStateChange() will give a pretty
good indicator of a hangup if the state has become
TelephonyManager.CALL_STATE_IDLE.  I've figured out how to do the UI
part, how to save it in a database, etc... My question, however, is
about how I implement this "listening" aspect of it.

Should I have a service running all the time that has an instance of
android.telephony.PhoneStateListener? If so, do I use the onBind or
onStart method, and how do I make sure it doesn't go away when memory
runs low? Or can I somehow attach the listener to this event, and then
terminate?
Or is a BroadcastReceiver the way to go?

Any advice on which approach to use (and/or pointers to sample code)
would be greatly appreciated!
Thanks,
-Dan

-- 
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

Reply via email to