Cannot register to GCM for push notifications on Android version 5 and 5.1 -


gcm notifications works on devices gcm notifications can not register in android 5.0 or 5.1 os. not getting response gcm. did have problem? please me?

mycode:

registerreceiver(                             ongcmregistrationfinish,                             new intentfilter(                                     commonutilities.registration_finish_action));                      intent registrationintent = new intent(                             "com.google.android.c2dm.intent.register");                     // sets app name in intent                     registrationintent.putextra("app", pendingintent                             .getbroadcast(login.this, 0, new intent(), 0));                     registrationintent.putextra("sender",                             commonutilities.sender_id);                      login.this.startservice(registrationintent); 

my manifest file :

            <category android:name="com.xxx.xxx" />         </intent-filter>     </receiver>      <service         android:name=".gcmintentservice"         android:enabled="true" />  <!-- ===================================== gcm premission =========================================== --> <uses-permission android:name="android.permission.wake_lock" />  <permission     android:name="com.xxx.xxx.permission.c2d_message"     android:protectionlevel="signature" />  <uses-permission android:name="com.xxx.xxx.permission.c2d_message" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="android.permission.use_credentials" /> <uses-permission android:name="android.permission.vibrate" /> 

thanks :)


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -