On Dec 15, 2011, at 11:54 AM, Martyn Wendon wrote: > Can anybody see any problem with the following? > > [BroadcastReceiver] > [IntentFilter(new[] { Android.Content.Intent.ActionBootCompleted }, > Categories = new[] { Android.Content.Intent.CategoryDefault } > )] > public class BootReceiver : BroadcastReceiver > { > public override void OnReceive(Context context, Intent intent) > { > Log.Debug("ReceiveBoot.OnReceive", "Received Intent " + > intent.Action); > > if ((intent.Action != null) && (intent.Action == > Android.Content.Intent.ActionBootCompleted)) > { > Log.Debug("ReceiveBoot.OnReceive", "Received > ActionBootCompleted Intent"); > > Android.Content.Intent start = new > Android.Content.Intent(context, typeof(ActivityTest)); > start.AddFlags(ActivityFlags.NewTask); > context.ApplicationContext.StartActivity(start);
Try using context.StartActivity() instead of context.ApplicationContext.StartActivity(). Another important question is this: what platform are you running on? Honeycomb changed things so that apps won't get the BOOT_COMPLETED notification unless the user has launched the app at least once, so if you just install your app then reboot the device, you won't get the notification. - Jon _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid