[android-developers] Re: activity on boot
Actually, I guess the key was realizing I could have multiple intent-filter tags. Adding the latter one resolved the issue:
I guess I had previously been swapping between the two as I needed.
Thanks.
On Monday, May 6, 2013 2:34:04 PM UTC-5, bob wrote:
--So, I have a broadcast receiver that is supposed to start an activity on device boot:public class Boot_Receiver extends BroadcastReceiver{@Overridepublic void onReceive(Context context, Intent intent){Intent activity_intent = new Intent(Main_Activity.class.getName()); activity_intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) ; context.startActivity(activity_intent); }}I think it used to work, but now it gives an error. I can't seem to make heads or tails of the error:Any ideas?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
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home