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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:18:34+00:00 2026-05-28T07:18:34+00:00

I would like to add Push messaging to my Phonegap Android App and believe

  • 0

I would like to add Push messaging to my Phonegap Android App and believe that C2DM is the waybest way to make this work – could point me in the right direction to set this up?
Is there a plugin or tutorial to help with this?

Also – do I actually need a plugin – is it possible to add C2dm to my app the traditional Android way without messing up my phonegap setup?

  • 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-28T07:18:34+00:00Added an answer on May 28, 2026 at 7:18 am

    Yes, C2DM is the Android Push solution. On https://github.com/awysocki/C2DM-PhoneGap you can find an example implementation.

    The files in the com.google namespace have to be included unchanged, they are from the session “Google IO Session Overview: Android + App Engine: A Developer’s Dream Combination”, see http://bradabrams.com/2011/05/google-io-session-overview-android-app-engine-a-developers-dream-combination/

    So these are the steps you should perform:

    1. Add the 3 com.google classes to your project
    2. Create a class called C2DMReceiver (naming convention) which inherits from C2DMBaseReceiver and implement the necessary abstract events
    3. Set up the AndroidManifest.xml

    The AndroidManifest looks like

    <!-- set up an own permission to secure our C2DM mesages -->
    <permission android:name="your.namespace.permission.C2D_MESSAGE"
                android:protectionLevel="signature" />
    
    <!-- List of permission -->
    <uses-permission android:name="your.namespace.permission.C2D_MESSAGE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    
    <application ..>
    
        <!-- Your implementation of the class C2DMReceiver, base class is Googles C2DMBaseReceiver -->
        <service android:name=".C2DMReceiver" />
    
        <!-- Googles broadcast receiver, it delegates to your.namespace.C2DMReceiver -->
        <receiver
                android:name="com.google.android.c2dm.C2DMBroadcastReceiver"
                android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <category android:name="your.namespace" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="your.namespace" />
            </intent-filter>
        </receiver>
    </application>
    

    If you receive on the emulator the error “E/CSE Notifications(401): Registration error ACCOUNT_MISSING”, you have to add a Google account to your emulator.

    For your second question: it depends what you want to do. When you receive the message and you just want to display a notification so that the user is able to start your app then you don’t need a Phonegap plugin. In that case you can solve everything in java.

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

Sidebar

Related Questions

I would like to add a value with this signs _gaq.push(['_trackEvent', '', '', '']);
I have own project and i would like add for this class same as
I would like to add resource files to a .bundle and push them to
I would like to know how I could add a bar that would contain
I would like to add an update hook to git that prevents people from
I would like to add an update hook to git that prevents people from
I have json_encoded array that i would like to add to using php [{id:a,value:2},{id:b,value:2}]
I have a ListView and each item have a TextView. I would like add
I would like to add a GestureDetector to all views (view groups) of an
I would like to add a custom calculation method to a managed object (which

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.