Accessing Phone and Network Properties and Status

Access to the telephony APIs is managed by the Telephony Manager, accessible using the getSystemService method as shown in Listing 12-2.

LISTING 12-2: Accessing the Telephony Manager

Available for String srvcName = Context.TELEPHONY_SERVICE;

Wrox°comn TelephonyManager telephonyManager = (TelephonyManager)getSystemService(srvcName);

The Telephony Manager provides direct access to many of the phone properties, including device, network, SIM, and data state details.

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide


Post a comment