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

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

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

2011-06-25 Thread Dianne Hackborn
(1) Third party applications can't have a priority higher than 0.
(2) A receiver is different than an activity, and will not handle intents
that are being used to launch an activity, so your receiver here will never
have any reason to run.

On Sat, Jun 25, 2011 at 2:54 AM, Sudeep Sharma sudeep.andr...@gmail.comwrote:

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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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

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

2011-06-25 Thread Mark Murphy
On Sat, Jun 25, 2011 at 2:00 PM, Dianne Hackborn hack...@android.com wrote:
 (1) Third party applications can't have a priority higher than 0.

Are you sure about that? It worked the last time I tried it, and the
documentation's example (100) is higher than 0.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 3.5 Available!

-- 
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