Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8719691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:51:35+00:00 2026-06-13T06:51:35+00:00

I have been trying to get Google Cloud Messaging to create push notifications. I

  • 0

I have been trying to get Google Cloud Messaging to create push notifications. I am able to register the device, store the registration id on the server, and then send the push message back to the device.

I am able to do all these and the catLog showed that the push message got to the device. But on the device the push notification message did not appear.

What could be the cause of this?

Just in case, here is how I register the device:

        GCMRegistrar.checkDevice(this); 
        GCMRegistrar.checkManifest(this);

        final String regId = GCMRegistrar.getRegistrationId(this);
        if (regId.equals("")) 
        {
            // Automatically registers application on startup. 
            GCMRegistrar.register(getApplicationContext(), SENDER_ID); 
        } 
        else 
        {        
            // Device is already registered on GCM, check server. 
            if (GCMRegistrar.isRegisteredOnServer(getApplicationContext())) 
            { 
                // Not sure what to do here :)
            } 
            else 
            {
                if ( user_id != null )
                {
                    GCMRegistrar.register(this, SENDER_ID); // google register         
                    setRegistrationId ( user_id , regId ); // saves id on server
                }
            }
        }

End on onPostExecute I do GCMRegistrar.setRegisteredOnServer(getApplicationContext(), true);

Here is my onMessage() method in my GCMIntentService

  @Override
  protected void onMessage(Context ctxt, Intent message) {
    Bundle extras=message.getExtras();

    for (String key : extras.keySet()) {
      Log.d(getClass().getSimpleName(),
            String.format("onMessage: %s=%s", key,
                          extras.getString(key)));
    }
  }

Is this the problem maybe? How should it actually be?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:51:36+00:00Added an answer on June 13, 2026 at 6:51 am

    What could be the cause of this?

    Here are some possibilities:

    1. You do not have a GCMIntentService subclass in your app.

    2. You do, but it is not registered in the manifest.

    3. You do, but you did not override onMessage()

    4. You did, but your onMessage() is not properly logging the event or otherwise letting you know that the event occurred.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get Google Chrome (6.0.401.1 dev) on Mac OS X
I have been trying since yesterday to get google like paging, but each time
I have been trying with google chrome and inspecting elements, but I cant get
http://code.google.com/p/lokad-cloud/wiki/Serialization I have been trying to swap the default serialization in Lokad.Cloud. I have
I have been trying to get Markers to Cluster on a Google map for
I have been trying to get my Arduino/Eclipse environment setup. For some reason I
I have been trying to get a handle on using MVC 4.0 with EF
I have been trying to get Twitter Bootstrap btn-group with dropdown to work for
I have been trying to get tsung to connect to a box I have
I have been trying to get a custom Value from the Custom Field that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.