title: Get Android device token
body: <p>I am integrating <code>Pushwoosh</code> API for push notifications for which I require <strong>deviceToken</strong>. How do I get it :  </p>
  
  <p>I am getting empty string using this :  </p>
  
  <pre><code>String deviceToken=GCMRegistrar.getRegistrationId(getApplicationContext()); 
  </code></pre>
  
  <p>These are the permissions I have in my <strong>AndroidMainfest.xml</strong> :  </p>
  
  <pre><code>&lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/&gt;
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
  
  &lt;permission android:name="com.example.gcm.permission.C2D_MESSAGE"
      android:protectionLevel="signature" /&gt;
  &lt;uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" /&gt;
  
  &lt;application ...&gt;
      &lt;receiver
          android:name=".GcmBroadcastReceiver"
          android:permission="com.google.android.c2dm.permission.SEND" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
              &lt;category android:name="com.example.gcm" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      &lt;service android:name=".GcmIntentService" /&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>Is this the right way to get <strong>deviceToken</strong>.</p>