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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:25:43+00:00 2026-06-14T10:25:43+00:00

I used the demo GCM example provided by Google, it works fine, except it

  • 0

I used the demo GCM example provided by Google, it works fine, except it sends by default message “GCM: you received message!”, I would like to alert to send instead a string, but dont know how?

Server code:

 Message message =new Message.Builder().addData("data", "hello client").build();

     Result result = sender.send(message, registrationId, 5);

Client Code:

 public void onReceive(Context context, Intent intent) {


            String details = intent.getStringExtra("data");
            System.out.println("Message="+details);

        }

does any body have an example of GCM example with payload?

  • 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-14T10:25:44+00:00Added an answer on June 14, 2026 at 10:25 am

    man, i found the show notification message is local ,not from the server…..

    @Override
    protected void onMessage(Context context, Intent intent) {
        Log.i(TAG, "Received message");
        String message = getString(R.string.gcm_message);
        displayMessage(context, message);
        // notifies user
        generateNotification(context, message);
    }
    

    you will find the program set message to R.string.gcm_message…..

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

Sidebar

Related Questions

I've used he rails engine to create a demo app. Everything works fine, except
I have used the demo here. All works well. http://code.msdn.microsoft.com/Word-2010-Using-the-Drag-81bb5bff However, when I try
I already used jquery combobox autocomplete like on the demo below. jquery combobox autocomplete
I used Android's Google Analytic trackEvent and tested it using Google's demo code: @Override
I used this side to create my demo application http://windowsclient.net/learn/video.aspx?v=314683 The site was very
I've used it before (as a demo thing) but I can't find the code.
This demo only Works in IE6, IE7, and IE8. http://www.impressivewebs.com/css3-rounded-corners-in-internet-explorer/ What technique is being
I used the Single Sign-on demo from: http://www.codeproject.com/KB/aspnet/SingleSignon.aspx And I add a SignOut function
What am I missing here? Please note: jQuery MOBILE is used DEMO using preventDefault
In Yii framework I used migration just like ./yiic migrate create tbl_demo it made

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.