Try adding

<category android:name="android.intent.category.DEFAULT" />

to the receiver intent-filter.

I don't think this will work but I am interested to see what result
you get :)

--
RichardC

On Oct 3, 12:38 pm, "jonathan.duty" <[email protected]> wrote:
> I was wondering if its possible to have a broadcast receiver to listen
> when the app its in launches.  I tried doing by creating a
> BroadcastReceiver to listen for the android.intent.action.MAIN action
> but it never gets called?  Is there something I need to do or a
> different action I should be listening for?
>
> Here is my manifest xml:
>
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>       package="com.jonandkerry.helloworld"
>       android:versionCode="1"
>       android:versionName="1.0">
>     <application android:icon="@drawable/icon" android:label="@string/
> app_name">
>
>         <activity android:name=".HelloAndroid"
>                   android:label="@string/app_name">
>             <intent-filter>
>                 <action android:name="android.intent.action.MAIN" />
>                 <category
> android:name="android.intent.category.LAUNCHER" />
>             </intent-filter>
>         </activity>
>
>         <receiver android:name=".ApplicationLaunchReceiver">
>                         <intent-filter>
>                                 <action 
> android:name="android.intent.action.MAIN" />
>                         </intent-filter>
>         </receiver>
>
> </application>
>
>     <uses-sdk android:minSdkVersion="3" />
>
>     <uses-permission android:name="android.permission.INTERNET" />
>
> <uses-permission android:name="INTERNET"></uses-permission>
>
> </manifest>
--~--~---------~--~----~------------~-------~--~----~
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