Code example for TelephonyManager

Methods: getCallState

0
	@Override protected void onResume() { 
		super.onResume(); 
 
		registerReciever(); 
 
		if (tm.getCallState() == TelephonyManager.CALL_STATE_IDLE) {
			debugLog("phone is idle, stopping."); 
			exitCleanly(); 
		} 
	} 
 
	/**  
	 * unregister phone state receiver, schedule restart if not exiting at the users request  
	 */ 
	@Override protected void onPause() { 
		super.onPause(); 
		 
		unHookReceiver(); 
		 
		if (!isFinishing())  
		{