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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:23:35+00:00 2026-06-02T06:23:35+00:00

I am attempting to register my device with C2DM and am having major issues.

  • 0

I am attempting to register my device with C2DM and am having major issues. I have followed several tutorials, all of which are very similar. I believe the issue has to do with the registration intent that it sends to the C2DM server. Does anyone have any suggestions. The following is the relevant code:

Manifest: The permissions (outside my application tag):

<!-- Used for C2DM -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.companyname.parade.permission.C2D_MESSAGE" />

This is the Intent registration (inside my application tag):

<receiver
    android:name=".C2DMReceiver"
    android:permission="com.google.android.c2dm.permission.SEND" >
    <!-- Receive the actual message -->
    <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE" />

        <category android:name="com.companyname.parade" />
    </intent-filter>
    <!-- Receive the registration id -->
    <intent-filter>
        <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
        <category android:name="com.companyname.parade" />
    </intent-filter>
</receiver>

The following is what I call to register my device to the C2DM server (it starts the service that contacts the C2DM servers that is suppose to send back a registration Intent with my registartionID in it). It is located in a file called C2DMessaging:

public static void register(Context context) {
    Intent registrationIntent = new Intent(REQUEST_REGISTRATION_INTENT);
    registrationIntent.putExtra(EXTRA_APPLICATION_PENDING_INTENT,
            PendingIntent.getBroadcast(context, 0, new Intent(), 0));
    registrationIntent.putExtra(EXTRA_SENDER, SENDER_ID);
    ComponentName name = context.startService(registrationIntent);
    if(name == null){
        // FAIL!
        Log.d(TAG, "FAIL");
    }else{
        // SUCCESS
        Log.d(TAG, "Success");
    }
}

The ComponentName info is the following:

com.google.android.gsf/com.google.android.gsf.gtalkservice.PushMessagingRegistrar

There is no logcat output. My receiver (named C2DMReceiver) is the following:

@Override
public void onReceive(Context context, Intent intent) {
    String action = intent.getAction();
    if (C2DMessaging.INTENT_REGISTRATION_CALLBACK.equals(action)) {
        // Registration Intent
        Log.w(TAG, "Registration Receiver called");
        handleRegistration(context, intent);
    } else if (action.equals(C2DMessaging.INTENT_RECEIVED_MESSAGE_CALLBACK)) {
        Log.w(TAG, "Message Receiver called");
        handleMessage(context, intent);
    } else if (action.equals(C2DMessaging.INTENT_C2DM_RETRY)) {
        C2DMessaging.register(context);
    }
}

This does not get called at all.

Edit: This whole thing was a stupid mistake on my part. I simply forgot a step somehow in the tutorials I read. I need to add this to my permissions:

<permission android:name="com.companyname.parade.permission.C2D_MESSAGE" android:protectionLevel="signature" />

Thanks to MisterSquonk for the response.

  • 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-02T06:23:36+00:00Added an answer on June 2, 2026 at 6:23 am

    From the Google docs for C2DM for Creating the Manifest, the manifest needs a <permission> entry to complement the <uses-permission> entry for C2D_MESSAGE.

    Something like this…

    <permission android:name="com.companyname.parade.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a device driver module which does a register_chardev(). In the driver open()
I'm attempting to register an anonymous function when a user clicks a cell in
I am attempting to register a .dll using RegAsm. It is a .NET 2.0
I have a .net application calling to a COM component (C++) which in turn
I am having issues with Namespaces within ActiveAdmin. If I add config settings to
I'm attempting to dynamically register entities and configurations with a context (ef4 code-only) I
I am attempting to make a registration-like page for a small forum. To register
Am attempting to add push notifications to an application that I have created. I
I'm attempting to register a GIS based dll on a test computer and I'm
I'm attempting to create a CodeActivity object that will register a DLL on a

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.