Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-4157

Experiment with using Services to assist the Broadcast listener

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • None
    • None
    • push

    Description

      MyGcmListenerService
      extends GcmListenerService
      MyInstanceIDListenerService
      Extends InstanceIDListenerService
      /**

      • Called if InstanceID token is updated. This may occur if the security of
      • the previous token had been compromised. This call is initiated by the
      • InstanceID provider.
        */
        // [START refresh_token]
        @Override
        public void onTokenRefresh() { // Fetch updated Instance ID token and notify our app's server of any changes (if applicable). Intent intent = new Intent(this, RegistrationIntentService.class); startService(intent); }

        // [END refresh_token]

      RegistrationIntentService
      bespoke for purpose of handingling intentIDs and registering with service

      Alternatively, developers who choose to not use the new GcmReceiver andGcmListenerService can implement their own GcmBroadcastReceiver to check for topic messages by looking at the from field.

      Attachments

        Activity

          People

            Unassigned Unassigned
            supittma@redhat.com Summers Pittman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: