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 8910627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:44:14+00:00 2026-06-15T03:44:14+00:00

While my device has not internet connection, I am sending message from server to

  • 0

While my device has not internet connection, I am sending message from server to application with GCM. After that, when device connect the internet, i can’t get the message. Is it normal?

from http://developer.android.com/guide/google/gcm/adv.html

“If the device is not connected to GCM, the message will be stored until a connection is established (again respecting the collapse key rules). “

My messages have same collapse key; but still I have to get only 1 message when device is connected.

  • 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-15T03:44:16+00:00Added an answer on June 15, 2026 at 3:44 am

    you can get all the messages send to your device.

    GCM server keeps account of your all messages send to your device. And it shows these in notification area whenever device get connected to Internet.

    You are getting only one message because you are assigning same NOTIFICATION ID in notify() function of your code

    your code probably using this :

            // 0 is notification id
            notificationManager.notify(0, notification); 
    

    change your NOTIFICATION ID everytime to get all messages in notification area.

    Such As :

            static int NOTIFICATION_ID = 0;
    
            if (NOTIFICATION_ID > 1073741824) {
                NOTIFICATION_ID = 0;
            }
            notificationManager.notify(NOTIFICATION_ID++, notification);
    

    if clause keeps you safe from overflow of int value. You can ignore it according to your requirement.

    I have already tested this scenario. Now its your turn.
    Happy to Help !!

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

Sidebar

Related Questions

Tiles of google maps are not loading on actual device while it works on
I am getting following error while installing the application on my device. before running
While developing an application using gwt in ecliplse crashed. Now the server is running
my C# application reads data from special USB device. The data are read as
Accidentally while running a downloaded application in order to run it on device, I
I am not able to FTP a file from Iphone device(with wifi) to remote
For some reason, when I press Capture while my device is connected and running
I'm only starting with Android dev, and while the Milestone is a nice device
While debugging and keep pressing F5, if the source code does not exist, eclipse
Well, I've looked all over the internet, and it appears that what I want

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.