you can use:

TelephonyManager test =
(TelephonyManager)getSystemService(TELEPHONY_SERVICE);

On Mon, Aug 18, 2008 at 4:57 PM, Raymond Rodgers <[EMAIL PROTECTED]>wrote:

>
> Hi folks,
>  Although I'm new to Android development, I'm not new to Java
> development and I understand that not all classes are meant to be
> directly instantiated. I'm trying to write a class that derives from
> PhoneStateListener, and I need to tell the TelephonyManager that my
> class will be listening for certain events. The thing is, I can't figure
> out how to get access to the TelephonyManager. Initially, I thought the
> listen method that I need might be static, but it doesn't appear to be
> so, so I tried instantiating an instance of TelephonyManager in order to
> call the method. As some of you may know, the TelephonyManager doesn't
> have a default constructor (no parameters) and the constructors aren't
> documented.
>
>  So I spent a bit of time looking for a "factory" method or a static
> method some where that would give me a reference to the
> TelephonyManager, but I can't seem to find one. Can anyone point me in
> the right direction on how to access it?
>
> Thank you!
> Raymond
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to