title: GCMRegistrar.register(this, SENDER_ID); is showing Registering app com.example.fbbookresale of senders 742646281XXX
body: <p>I have been searching for days and it seems like many have encountered the same problem.</p>
  
  <p>I have tried to register my application in my device to obtain ID from GCM. I referred <a href="http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/" rel="nofollow">androidhive</a>.</p>
  
  <p>I am not able to obtain the ID using GCMRegistrar.register(this, SENDER_ID), I double checked my Sender ID and it's correct. </p>
  
  <pre><code>public class MainActivity extends Activity {
  boolean flag=false;
  AsyncTask&lt;Void, Void, Void&gt; mRegisterTask;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      // Device is already registered on GCM
      GCMRegistrar.checkDevice(this);
  
      GCMRegistrar.checkManifest(this);
      registerReceiver(mHandleMessageReceiver, new IntentFilter(
              DISPLAY_MESSAGE_ACTION));
      final String regId = GCMRegistrar.getRegistrationId(this);
               Log.v("RegId", regId);
      if (regId.equals("")) {
  
          GCMRegistrar.register(this, SENDER_ID);
      } else {
  
          if (GCMRegistrar.isRegisteredOnServer(this)) {
  
              Toast.makeText(getApplicationContext(), "Already registered with GCM", Toast.LENGTH_LONG).show();
          } else {
  
  
              mRegisterTask = new AsyncTask&lt;Void, Void, Void&gt;() {
  
                  @Override
                  protected Void doInBackground(Void... params) {
  
                       Map&lt;String, String&gt; prms=new HashMap&lt;String, String&gt;();
                       prms.put("regId", regId);
                      try {
                          post(SERVER_URL,prms);
                      } catch (IOException e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                      }
                      return null;
                  }
  
                  @Override
                  protected void onPostExecute(Void result) {
                      mRegisterTask = null;
                  }
  
              };
              mRegisterTask.execute(null, null, null);
          }
      }
  </code></pre>
  
  <p>GCM intent Service is written in main package</p>
  
  <pre><code>public class GCMIntentservice extends GCMBaseIntentService{
  
  private static final String TAG = "GCMIntentService";
  
  public GCMIntentservice() {
      super(SENDER_ID);
  }
  
  
  @Override
  protected void onError(Context arg0, String arg1) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  protected void onMessage(Context arg0, Intent arg1) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  protected void onRegistered(Context arg0, String arg1) {
          // TODO Auto-generated method stub
       Log.i(TAG, "Device registered: regId = " + arg1);
  
  }
  
  @Override
  protected void onUnregistered(Context arg0, String arg1) {
      // TODO Auto-generated method stub  
      Log.i(TAG, "Device unregistered");  } }
  </code></pre>
  
  <p>Here is my manifest</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.fbbookresale"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="8" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  &lt;permission android:name="com.example.fbbookresale.permission.C2D_MESSAGE"
       android:protectionLevel="signature"/&gt;
  &lt;uses-permission android:name="com.example.fbbookresale.permission.C2D_MESSAGE" /&gt;
  &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
  &lt;uses-permission android:name="android.permission.GET_ACCOUNTS"/&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK"/&gt;
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="MainActivity"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.example.fbbookresale.MainActivity"
          android:label="MainActivity" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/&gt;
      &lt;/activity&gt;
      &lt;meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/&gt;
      &lt;activity android:name="com.facebook.LoginActivity" android:label="@string/app_name"&gt;
      &lt;/activity&gt;
       &lt;activity
          android:name="com.example.fbbookresale.BuyNSell"
          android:label="" &gt;
          &lt;/activity&gt;
           &lt;activity
          android:name="com.example.fbbookresale.Edit"
          android:label="" &gt;
          &lt;/activity&gt;
  
          &lt;activity
          android:name="com.example.fbbookresale.Add"
          android:label="Buy" &gt;
          &lt;/activity&gt;
            &lt;receiver
          android:name="com.google.android.gcm.GCMBroadcastReceiver"
          android:permission="com.google.android.c2dm.permission.SEND" &gt;
          &lt;intent-filter&gt;
  
              &lt;!-- Receives the actual messages. --&gt;
              &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
              &lt;!-- Receives the registration id. --&gt;
              &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
  
              &lt;category android:name="com.example.fbbookresale" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
                  &lt;service android:name=".GCMIntentservice" /&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>the logcat is showing</p>
  
  <pre><code>11-23 09:34:54.193: D/GCMRegistrar(987): resetting backoff for com.example.fbbookresale
  11-23 09:34:54.193: V/GCMRegistrar(987): Registering app com.example.fbbookresale of  senders 742646281XXX
  
  11-23 11:17:27.821: V/GCMBroadcastReceiver(1046): onReceive: com.google.android.c2dm.intent.REGISTRATION
  11-23 11:17:27.821: V/GCMBroadcastReceiver(1046): GCM IntentService class: com.example.fbbookresale.GCMIntentService
  11-23 11:17:27.831: V/GCMBaseIntentService(1046): Acquiring wakelock
  </code></pre>
  
  <p>It's not even showing the <code>Log.v("RegId", regId);</code> in the verbose.</p>