> So because you're targeting a BroadcastReceiver, you would call
> sendBroadcast() instead of startActivity().
Thanks Jeff for quick response. What I want to do is start an activity
but I tried the Broadcast Receiver because I was getting the activity
not found error with the manifest like this:
<activity android:name=".MyActivity" android:label="@string/
app_name">
<intent-filter>
<action android:name="com.example.Intent1" />
</intent-filter>
Is there something wrong with that used in conjunction with
startactivity()?
Thanks,
Bob
On Apr 29, 10:32 pm, Jeff Sharkey <[email protected]> wrote:
> So because you're targeting a BroadcastReceiver, you would call
> sendBroadcast() instead of startActivity().
>
> j
>
>
>
> On Wed, Apr 29, 2009 at 6:45 PM, Bob <[email protected]> wrote:
>
> > Hi,
> > Can anyone tell me what I am doing wrong, I'm sure it is real simple.
> > I am trying to create a custom intent but everytime I try to launch it
> > from another activity I get a "No Activity found to handle Intent"
> > error? Am I failing to register the new intent somehow even though it
> > is in the manifest?
>
> > Thanks,
> > Bob
>
> > In other activity,produces error:
>
> > Intent i = new Intent("com.example.Intent1");
> > startActivity(i);
>
> > In Receiver Activity:
>
> > In Manifest:
>
> > <receiver android:name=".TestBroadcastReceiver"
> > android:enabled="true" >
> > <intent-filter>
> > <action android:name="com.example.Intent1" />
>
> > </intent-filter>
> > </receiver>
>
> > In Code File:
>
> > import android.content.BroadcastReceiver;
> > import android.content.Context;
> > import android.content.Intent;
>
> > public class TestBroadcastReceiver extends BroadcastReceiver {
>
> > �...@override
> > public void onReceive(Context context, Intent intent) {
> > // TODO Auto-generated method stub
>
> > }
>
> > }
>
> --
> Jeff Sharkey
> [email protected]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---