Пример #1
0
        static void SetRetryBroadcastReceiver(Context context)
        {
            if (sRetryReceiver == null)
            {
                sRetryReceiver = new GCMBroadcastReceiver();
                var category = context.PackageName;

                var filter = new IntentFilter(GCMConstants.INTENT_FROM_GCM_LIBRARY_RETRY);
                filter.AddCategory(category);

                var permission = category + ".permission.C2D_MESSAGE";

                Log.Verbose(TAG, "Registering receiver");

                context.RegisterReceiver(sRetryReceiver, filter, permission, null);
            }
        }
Пример #2
0
		static void SetRetryBroadcastReceiver(Context context)
		{
			if (sRetryReceiver == null)
			{
				sRetryReceiver = new GCMBroadcastReceiver();
				var category = context.PackageName;

				var filter = new IntentFilter(GCMConstants.INTENT_FROM_GCM_LIBRARY_RETRY);
				filter.AddCategory(category);

				var permission = category + ".permission.C2D_MESSAGE";

				Log.Verbose(TAG, "Registering receiver");

				context.RegisterReceiver(sRetryReceiver, filter, permission, null);
			}
		}