es.cesar.quitesleep.listeners
Class MyPhoneStateListener

java.lang.Object
  extended by PhoneStateListener
      extended by es.cesar.quitesleep.listeners.MyPhoneStateListener

public class MyPhoneStateListener
extends PhoneStateListener

Author:
Cesar Valiente Gordo

Constructor Summary
MyPhoneStateListener(Context context)
          Constructor with the context parameter for use if the application not run and is the BOOT_COMPLETED BroadcastReceiver that is launch this.
 
Method Summary
 void onCallStateChanged(int state, java.lang.String incomingNumber)
          Function that receive the state id for the phone state type (idle, offhook and ringing), and the incoming number that is doing the call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyPhoneStateListener

public MyPhoneStateListener(Context context)
Constructor with the context parameter for use if the application not run and is the BOOT_COMPLETED BroadcastReceiver that is launch this.

Parameters:
context -
ITelephony -
Method Detail

onCallStateChanged

public void onCallStateChanged(int state,
                               java.lang.String incomingNumber)
Function that receive the state id for the phone state type (idle, offhook and ringing), and the incoming number that is doing the call.