I don't believe it matters what Intent category is used, since the
OnReceive Method is never called.

I think I worked out what was happening though, at some point we added
the option for the application to be installed to SD Card and it appears
that applications installed on the SD Card may not receive the
ActionBootCompleted since the SD Card is not mounted until after the
ActionBootCompleted Intent is sent!

Removing the option for installation to SD Card got things working
again, although we then ran into another issue where the application is
being killed due to the OnReceive method taking > 10 seconds to return
:-(

So we're working on reducing application load time at the moment....



Thanks,

Martyn

-----Original Message-----
From: monodroid-boun...@lists.ximian.com
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of riteshsahu
Sent: 15 December 2011 22:30
To: monodroid@lists.ximian.com
Subject: Re: [mono-android] Automatic activity start

Have you tried using Android.Content.Intent.CategoryHome instead of
Android.Content.Intent.CategoryDefault ?


Martyn Wendon wrote
> 
> -----Original Message-----
> From: monodroid-bounces@.ximian
> [mailto:monodroid-bounces@.ximian] On Behalf Of Jonathan Pryor
> Sent: 15 December 2011 17:03
> To: Discussions related to Mono for Android
> Subject: Re: [mono-android] Automatic activity start
> 
> 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);
> 
> 
> 


--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Automatic-activity-start-t
p5078121p5078857.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud
service.
______________________________________________________________________

______________________________________________________________________
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

Reply via email to