Please see //Problem where the new intent is created...



On Mar 2, 10:09 am, Bnet <[email protected]> wrote:
> public class MyPhoneStateListener extends PhoneStateListener {
>
>          final static String TAGTEXT = "DEBUG LISTENER!!!";
>      boolean ringing = false;
>      boolean offhook = false;
>
>     @Override
>         public void onCallStateChanged(int state,String incomingNumber){
>                 switch(state)
>         {
>      case TelephonyManager.CALL_STATE_IDLE:
>           Log.d(TAGTEXT,"IDLE");
>           Log.d(TAGTEXT,"ringing "+ringing+" offhook "+offhook);
>           if(ringing&&(!offhook))
>           {
>                Log.d(TAGTEXT, "You have missed a call");
>                 ringing = false;
>                 offhook = false;
>
>                 Intent i = new Intent
> ("com.bnet.detectmissedcall.SoundNotification");
>                 startActivity(i);
>
>           break; }
>
>      case TelephonyManager.CALL_STATE_RINGING:
>           Log.d(TAGTEXT, "RINGING");
>           ringing = true;
>           offhook = false;
>
>           break;
>      case TelephonyManager.CALL_STATE_OFFHOOK:
>           Log.d(TAGTEXT, "OFFHOOK");
>           offhook = true;
>           ringing = false;
>           break;
>
>      default:
>
>           break;
>      }
>
>     }
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to