Example #1
0
        public override void OnReceive (Context context, Intent intent)
        {
            var serviceIntent = new Intent (context, typeof (GcmService));
            serviceIntent.ReplaceExtras (intent.Extras);
            StartWakefulService (context, serviceIntent);

            ResultCode = Result.Ok;
        }
        /// <Docs>The Context in which the receiver is running.</Docs>
        /// <summary>
        /// This method is called when the BroadcastReceiver is receiving an Intent
        ///  broadcast.
        /// </summary>
        /// <param name="context">Context object.</param>
        /// <param name="intent">Intent object.</param>
        public override void OnReceive(Context context, Intent intent)
        {
            System.Diagnostics.Debug.WriteLine(string.Format("{0} - {1}", CrossGeofence.Id, "Region State Change Received"));
            var serviceIntent = new Intent(context, typeof(GeofenceTransitionsIntentService));
            serviceIntent.AddFlags(ActivityFlags.IncludeStoppedPackages);
            serviceIntent.ReplaceExtras(intent.Extras);
            serviceIntent.SetAction(intent.Action);
            WakefulBroadcastReceiver.StartWakefulService(context, serviceIntent);

            this.ResultCode = Result.Ok;
        }
        /// <summary>
        /// On geofence update received fires an intent to be handled by GeofenceTransitionsIntentService
        /// </summary>
        /// <param name="context"></param>
        /// <param name="intent"></param>
        public override void OnReceive(Context context, Intent intent)
        {
            Debug.WriteLine("{0} - {1}", CrossGeofence.Id, "Region State Change Received");
            var serviceIntent = new Intent(context, typeof(GeofenceTransitionsIntentService));
            serviceIntent.AddFlags(ActivityFlags.IncludeStoppedPackages);
            serviceIntent.ReplaceExtras(intent.Extras);
            serviceIntent.SetAction(intent.Action);
            StartWakefulService(context, serviceIntent);

            ResultCode = Result.Ok;
        }
        public override void OnReceive(Context context, Intent intent)
        {
          
			var serviceIntent = new Intent(context,typeof(PushNotificationImplementation));
            serviceIntent.AddFlags(ActivityFlags.IncludeStoppedPackages);
            serviceIntent.ReplaceExtras(intent.Extras);
            serviceIntent.SetAction( intent.Action);
            StartWakefulService(context, serviceIntent);
          

            ResultCode = Result.Ok;
        }