The problem is that in your manifest you do not specify an intent
filter for your activity, so the system doesn't know what to launch.
You either have to specify an intent filter for your activity in the
manifest, or you need to create the intent such that it explicitly
specifies the activity you want to start.


On Mon, Mar 2, 2009 at 11:25 AM, Bnet <tcb...@gmail.com> wrote:
>
> Thanks. Sorry, thought it was in the first messge.
>
> The problem is being new to Android and not being able successfully
> create an intent to call another class.
>
> Intent i = new Intent
> ("com.bnet.detectmissedcall.SoundNotification");
> startActivity(i);
>
>
> On Mar 2, 1:05 pm, Marco Nelissen <marc...@android.com> wrote:
>> It might help if you told us what exactly the problem is.
>>
>>
>>
>> On Mon, Mar 2, 2009 at 8:04 AM, Bnet <tcb...@gmail.com> wrote:
>>
>> > Problem starting a new activity, please see below...
>>
>> > 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;
>>
>> >              //problem//
>> >                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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to