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

  • Home
  • SEARCH
  • 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 6167821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:34:43+00:00 2026-05-23T22:34:43+00:00

I am developing android push notification application using C2DM,I am facing some problems in

  • 0

I am developing android push notification application using C2DM,I am facing some problems in my application.
The application is working when I am using same email address on both i-e server and client applications,

Can anyone tell me what will be the problem.

Altaf

  • 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-05-23T22:34:44+00:00Added an answer on May 23, 2026 at 10:34 pm

    It seems that you are under the wrong impression that the Role Email account which is created to identify the application using the C2DM service should be changed in the registration intent.

    You must have that role email the same as the one on the server otherwise Google will not be able to identify your application as sender/receiver of this c2dm message.
    Sample Registration Intent:

        Intent registrationIntent = new Intent(
                C2DMessaging.REQUEST_REGISTRATION_INTENT);
        registrationIntent.setPackage(C2DMessaging.GSF_PACKAGE);
        registrationIntent.putExtra(
                C2DMessaging.EXTRA_APPLICATION_PENDING_INTENT,
                PendingIntent.getBroadcast(context, 0, new Intent(), 0));
        registrationIntent.putExtra(C2DMessaging.EXTRA_SENDER, senderId);
        context.startService(registrationIntent);
    

    The Variable senderId here should hold the role account you created and signed up for C2DM on the google C2DM signup Page

    This same email is used to obtain the Authentication token from google servers which is used to send C2DM messages later

    Sample server code to get an authentication key:

            List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
            nameValuePairs.add(new BasicNameValuePair("Email",
                    senderId));
            nameValuePairs.add(new BasicNameValuePair("Passwd", "testpassword"));
            nameValuePairs.add(new BasicNameValuePair("accountType", "GOOGLE"));
            nameValuePairs.add(new BasicNameValuePair("source",
                    "Fleet Tracker Pro"));
            nameValuePairs.add(new BasicNameValuePair("service", "ac2dm"));
            post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
            HttpResponse response = client.execute(post);
            BufferedReader rd = new BufferedReader(new InputStreamReader(
                    response.getEntity().getContent()));
    
            String line = "";
            while ((line = rd.readLine()) != null) {
                if (line.startsWith("Auth=")) {
                    String auth = line.substring(5);
                    System.out.println("Auth token = " + auth);
                    return auth;
                }
            }
    

    notice the variable senderId this should also hold the role account you created and signed up for C2DM on the google C2DM signup Page
    any other email can be changed to whatever you like, but these to emails have to remain identical

    here is the definition from google C2DM page at google code:

    Sender ID An email account associated with the application’s
    developer. The sender ID is used in the registration process to
    identify a Android application that is permitted to send messages to
    the device. This ID is typically role-based rather than being a
    personal account—- for example, my-app@gmail.com.

    I hope i helped have a nice day.

    would have been nice if you included code snippets or more information about the emails you are talking about.

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

Sidebar

Related Questions

I'm currently developing an Android application that fetches images using http requests. It would
i am developing android application website address how can implemented validation example : www.yahoo.com
I'm developing Android application using third party libraries (Twitter4j). I want to be able
I am developing Android TextToSpeech app. This application is not working in Android 1.5
I am new in developing android applications. I want to create an android application(using
i am developing android application using Geocoder services, I have an application where I
Presently I am developing Android application for Samsung galaxy tab. I am using default
I am developing an android game application played using bluetooth. While searching for bluetooth
I'm developing an application that receives push notifications via XMPP ( I know C2DM,
I am developing my android application using Netbeans and java. When I am using

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.