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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:26:32+00:00 2026-05-27T20:26:32+00:00

I am trying to get basic functionality working to test with the Android C2DM

  • 0

I am trying to get basic functionality working to test with the Android C2DM service. I followed the example source found here:

http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html#c2dm

Here is the main activity which attempts the registration

public class C2DMClientActivity extends Activity {

public final static String AUTH = "authentication";

// Example Activity to trigger a request for a registration ID to the Google
// server
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
}

public void register(View view) {
    Log.w("C2DM", "start registration process");
    Intent intent = new Intent("com.google.android.c2dm.intent.REGISTER");
    intent.putExtra("app",
            PendingIntent.getBroadcast(this, 0, new Intent(), 0));
    // Sender currently not used
    intent.putExtra("sender", "nonsense@gmail.com");
    startService(intent);
}

public void showRegistrationId(View view) {
    SharedPreferences prefs = PreferenceManager
            .getDefaultSharedPreferences(this);
    String string = prefs.getString(AUTH, "n/a");
    Toast.makeText(this, string, Toast.LENGTH_LONG).show();
    Log.d("C2DM RegId", string);

}

}

Log cat result:

01-01 02:13:00.536: E/HttpResponse(670): <html><head>
01-01 02:13:00.536: E/HttpResponse(670): <meta http-equiv="content-type" content="text/html;charset=utf-8">
01-01 02:13:00.536: E/HttpResponse(670): <title>404 Not Found</title>
01-01 02:13:00.536: E/HttpResponse(670): </head>
01-01 02:13:00.536: E/HttpResponse(670): <body text=#000000 bgcolor=#ffffff>
01-01 02:13:00.536: E/HttpResponse(670): <h1>Error: Not Found</h1>
01-01 02:13:00.536: E/HttpResponse(670): <h2>The requested URL <code>/register</code> was not found on this server.</h2>
01-01 02:13:00.536: E/HttpResponse(670): <h2></h2>
01-01 02:13:00.536: E/HttpResponse(670): </body></html>

Is there any other information I can provide? Please let me know

  • 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-27T20:26:33+00:00Added an answer on May 27, 2026 at 8:26 pm

    The code you posted here has nothing to do with the error log you paste.

    Looking at the tutorial web, after successful registration on the device, it sends the info to your own server

    HttpPost post = new HttpPost(“http://your_url/register”);

    Looks like you forget to create the /register path

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

Sidebar

Related Questions

I'm trying to get the basic lawnchair example working. The Code: <script type=text/javscript src=http://westcoastlogic.com/lawnchair/src/lawnchair.js></script>
I am having a few issues trying to get some basic jquery functionality working
I am trying to get my head round some basic erlang functionality and I
I'm trying to get a basic flip animation transition working when I push a
I'm trying to get some basic ajax working on rails. I have a comon
Trying to get some basic drag/drop functionality happening for an iPhone application. My current
Trying to get a basic understanding of T-SQL here in SQL Server 2008. Suppose
I'm trying to get a basic datagrid for simple tabular input. The server will
I'm trying to get started with Three20 and just want to get a basic
Im trying to get into some basic JavaFX game development and I'm getting confused

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.