Exemple #1
0
        void Subscribe(string token)
        {
            var pubSub = GcmPubSub.GetInstance(this);

            pubSub.Subscribe(token, "/topics/global", null);
            App.sub.Text = "subscribed";
        }
        void Subscribe(string token)
        {
            var pubSub = GcmPubSub.GetInstance(this);

            pubSub.Subscribe(token, "/topics/bitopiAlert", null);
            PushNotificationSingleton.Instance.TokenId = token;
        }
 void SubscribeTopics(string token)
 {
     foreach (var topic in TOPICS)
     {
         var pubSub = GcmPubSub.GetInstance(this);
         pubSub.Subscribe(token, "/topics/" + topic, null);
     }
 }
 void subscribeToTopics(string token)
 {
     foreach (var topic in Topics)
     {
         var cgmPubSub = GcmPubSub.GetInstance(this);
         cgmPubSub.Subscribe(token, "/topics/" + topic, null);
     }
 }
Exemple #5
0
        //public async void SendRegistrationToAppServer(string token)
        //{
        //    TokenModel _token = new TokenModel();
        //    _token.User_id = Convert.ToInt32(CurrentUser.getUserId());
        //    _token.DeviceToken = token;
        //    ServiceWrapper svc = new ServiceWrapper();
        //    int x= await svc.InsertUpdateToken(_token);
        //    // Add custom implementation here as needed.
        //}

        // Subscribe to topics to receive notifications from the app server:
        private void SubscribeToTopics(string token, string[] topics)
        {
            foreach (var topic in topics)
            {
                var pubSub = GcmPubSub.GetInstance(this);
                pubSub.Subscribe(token, "/topics/" + topic, null);
            }
        }
 private void SubscribeTopics(string token)
 {
     foreach (string topic in Topics)
     {
         GcmPubSub pubSub = GcmPubSub.GetInstance(Android.App.Application.Context);
         pubSub.Subscribe(token, "/topics/" + topic, null);
     }
 }
Exemple #7
0
        private void SubscribeTopics(string token)
        {
            GcmPubSub pubSub = GcmPubSub.GetInstance(this);

            foreach (string topic in Topics)
            {
                pubSub.Subscribe(token, "/topics/" + topic, null);
            }
        }
        void Subscribe(string token)
        {
            string topic = "/topics/shopList_" + StoreFactory.Settings.GetAuthor();

            //string topic = "/topics/global";
            StoreFactory.CurrentVM.Logs.Add("Subscribing to GCM " + topic);
            var pubSub = GcmPubSub.GetInstance(this);

            pubSub.Subscribe(token, topic, null);
        }
Exemple #9
0
 private void Subscribe(string token)
 {
     try
     {
         var pubSub = GcmPubSub.GetInstance(this);
         pubSub.Subscribe(token, "/topics/global", null);
     } catch (Exception e)
     {
         Log.Error("RegistrationIntentService", e.Message);
     }
 }
 void Subscribe(string token)
 {
     try
     {
         var pubSub = GcmPubSub.GetInstance(this);
         pubSub.Subscribe(token, "/topics/global", null);
     }
     catch (Exception ex)
     {
     }
 }
Exemple #11
0
        void Subscribe(string token)
        {
            var pubSub = GcmPubSub.GetInstance(Android.App.Application.Context);

            pubSub.Subscribe(token, "/topics/global", null);

            var registrationComplete = new Intent("registrationComplete");

            registrationComplete.PutExtra("gcm_success", true);

            LocalBroadcastManager.GetInstance(Application.Context).SendBroadcast(registrationComplete);
            Log.Debug("RegistrationIntentService", "Subscribe complete");
        }
Exemple #12
0
 void Subscribe(string token)
 {
     try
     {
         var pubSub = GcmPubSub.GetInstance(this);
         pubSub.Subscribe(token, "/topic/global", null);
     }
     catch (Exception e)
     {
         Console.WriteLine("RegistrationIntentService::Subscribe(): Exception " + TraceHelper.ExceptionToString(e));
         return;
     }
 }
        private void Subscribe(string token)
        {
            var pubSub = GcmPubSub.GetInstance(this);

            pubSub.Subscribe(token, "/topics/global", null);
        }
        static void Subscribe(string token)
        {
            var pubSub = GcmPubSub.GetInstance(MainActivity.AppMainContext);

            pubSub.Subscribe(token, "/topics/global", null);
        }
Exemple #15
0
        void Subscribe(string token)
        {
            var pubSub = GcmPubSub.GetInstance(this);

            pubSub.Subscribe(token, "/topics/passcodes", null);
        }
        void Subscribe(string token)
        {
            var pubSub = GcmPubSub.GetInstance(this);

            pubSub.Subscribe(token, "/topics/idd_reclamo_estado", null);
        }
Exemple #17
0
        void Subscribe(string token)
        {
            var pubSub = GcmPubSub.GetInstance(this);

            pubSub.Subscribe(token, TOPIC, null);
        }