android.telephony
public
interface
android.telephony.IPhone
Interface for SDK developers to use to control the phone.
The following code snippet demonstrates a static method to
retrieve the IPhone interface from Android:
private static IPhone getPhoneInterface() throws DeadObjectException {
IServiceManager sm = ServiceManagerNative.getDefault();
IPhone phoneService = IPhone.Stub.asInterface(sm.getService("phone"));
return phoneService;
}
Nested Classes
Known Indirect Subclasses
Summary
Details
Public Methods
public
boolean
authenticateWithPin(String pin)
Authenticate against the SIM pin. This doesn't actually authenticate
against the SIM card, but rather compares against the SIM pin
stored in memory (if any).
Returns
- true if the pin supplied matches the SIM pin stored in memory.
public
void
call(String number)
Place a call to the numer.
Parameters
| number
| the number to be called.
|
public
void
dial(String number)
Dial a number. This doesn't place the call. It displays
the Dialer screen.
Parameters
| number
| the number to be dialed. If null, this
would display the Dialer screen with no number pre-filled.
|
public
void
endCall(boolean hangupOnly)
End call or go to the Home screen
public
boolean
isOffhook()
Check if we are in either an active or holding call
Returns
- true if the phone state is offhook.
public
boolean
isRadioOn()
Check to see if the radio is on or not.
Returns
- returns true if the radio is on.
public
boolean
isSimPinEnabled()
Check if the SIM pin lock is enabled.
Returns
- true if the SIM pin lock is enabled.
public
void
toggleRadioOnOff()
Toggles the radio on or off.
public
void
updateServiceLocation()
Reqeust to update location information in service state