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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:25:49+00:00 2026-06-12T06:25:49+00:00

I’m trying to register an Android app with google GCM and it seems to

  • 0

I’m trying to register an Android app with google GCM and it seems to be causing an error in eclipse. Any Help?

blows up as soon as I try to check if its registered. Its compiles fine and I have added the import com.google.android.gcm.GCMRegistrar; I think this is more about me not understanding java and eclipse, than GCM, but who knows

I’ve added step filters to ignore com.google.android.gcm.*

and I’ve made sure to include the gdm.jar library in my local libs folder with my project and the build path.

If i step through the code, it stops when I try to step over the first line where GCMRegistrar is referenced and says and says ‘source not found’. If I put no breakpoints, it still stops when it hits GCMRegistrar and says ‘source not found’.

private void checkRegistration(){
    try{
            if (!GCMRegistrar.isRegistered(getApplicationContext())) {
                 // Automatically registers application on startup.
                GCMRegistrar.register(getApplicationContext(), Utilities.GCM_SENDER_ID);
            } else {
                final String regId = GCMRegistrar.getRegistrationId(getApplicationContext());
                if(regId.equals("")){
                    GCMRegistrar.register(getApplicationContext(), Utilities.GCM_SENDER_ID);
                }else{
                // Device is already registered on GCM

                    if(regId == Utilities.getGcmRegKey(this)){

                    }else{
                        pwClient.updateGCMRef("add", regId, Utilities.getApiKey(this), Utilities.getDeviceId(this));
                        Utilities.setGcmRegKey(this, regId);
                    }
                }
            }
        }catch(Exception ex){
            Log.e("PW", "register error: " + ex.getMessage());
        }
    }
}
  • 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-12T06:25:51+00:00Added an answer on June 12, 2026 at 6:25 am

    I had to stop working on my GCM project, but I did at least manage to get the source for the GCM client side stuff, so it might help you debug a bit. Starting with the R17 SDK tools Google have made attaching source and javadocs a right pain, but it can be done.

    In the same ‘dist’ directory where you found the gcm.jar is another jar gcm-src.jar – that’s the source. So in your libs directory make a new file called gcm.jar.properties.

    It should contain one line like

    src=C:\\dev\\tools\\android-sdk-windows4.1\\extras\\google\\gcm\\gcm-client\\dist\\gcm-src.jar
    

    (Edit this to refer to your SDK installation, changing the \\s to /s if you are on Linux)

    Now close your project and reopen it, otherwise it won’t work, heaven knows why!

    You should now have ‘hover over’ javadoc type popups and be able to step into the GCMRegistrar static methods. As to why your code blows up, maybe this will get you closer.

    Incidentally the sample code I based my project on had these two lines at the start of the registration

    // Check that the device supports GCM (should be in a try / catch)
    GCMRegistrar.checkDevice(this);
    // Check the manifest to be sure this app has all the required permissions.
    GCMRegistrar.checkManifest(this);
    

    They might shed some light on things

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.