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);
}
}
}
Manifest has:
<uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
This was working previously, but I commented out the OnReceive method
during testing.
Now the application is nearing completion I have un-commented the
OnReceive, but the application does not automatically start at boot
time.
I see nothing in the adb logs at all - not even the initial "Received
Intent" log message, nor any errors.
Thanks,
Martyn
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid