Ok thank you, I will mess around with that then
On May 25, 5:03 am, Mark Murphy <[email protected]> wrote:
> GT wrote:
> > I just quite don't understand how to use the two...
>
> > This is what I have so far, am I even on the right track? And I do
> > appreciate the response...
>
> <snip>
>
> > @Override
> > public void onStart(Intent intent, int StartId)
> > {
> > String srvcName = Context.TELEPHONY_SERVICE;
> > TelephonyManager telephonyManager = (TelephonyManager)
> > getSystemService(srvcName);
> > }
>
> Depending on how you are using your service, you may want to get your
> TelephonyManager and use it in onCreate(). onStart() can be called
> several times; onCreate() is only called once before a corresponding
> onDestroy(). If you only need one listener for the service -- and you
> should only need one -- I'd register it via TelephonyManager#listen() on
> onCreate() and release it in onDestroy().
>
> > public class PhoneListener extends PhoneStateListener
> > {
>
> > }
>
> You could use a few methods here, but I suspect you realize that.
>
> --
> Mark Murphy (a Commons
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---