Saturday, June 25, 2011

[android-developers] Question on Broadcast receiver with some prioroty set and category set as Home

Hi,
      I have an application set as Home category having higher priority than the normal Home app. This is to show my app first as soon as the phone boots up.

I have a broadcast receiver also within my manifest which also has same category "home" with priority even more than of my activity.

Problem is when the phone is booted i do not see control coming in the Broadcast reciever (xyzReciever) at all although its priority is higher than that of activity.

Is   <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />

not applicable for Broadcast recievers?????

Activity Properties
<activity android:name=".ABC"
                  android:launchMode="singleTask"
                  android:clearTaskOnLaunch="true"
                  android:configChanges="keyboardHidden|orientation"
                  android:excludeFromRecents="true" >
            <intent-filter android:priority="101">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>


Reciever properties
<receiver android:name=".xyzReciever">
            <intent-filter android:priority="102">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
Please respond ....I shall be thankful.

Thanks ....

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment