Beispiel #1
0
        public override void OnReceive(Context context, Intent intent)
        {
            MobileServicesManager.SafeInit();

            if (intent.Action == Intent.ActionBootCompleted)
            {
                Analytics.TrackEvent("Received ActionBootCompleted Intent");

                if (!PersistentLocationTrackingService.IsRunning(context.ApplicationContext))
                {
                    context.StartService(new Intent(context.ApplicationContext, typeof(PersistentLocationTrackingService)));
                }
            }
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Xamarin.Forms.Forms.Init(this, bundle);
            MobileServicesManager.SafeInit();

            LoadApplication(new App());

            if (!PersistentLocationTrackingService.IsRunning(ApplicationContext))
            {
                StartService(new Intent(ApplicationContext, typeof(PersistentLocationTrackingService)));
            }

            Analytics.TrackEvent("Created MainActivity");
        }
Beispiel #3
0
 public override void OnCreate()
 {
     base.OnCreate();
     MobileServicesManager.SafeInit();
 }