notifications - App registration ID not generating in GCM Android -


I have tried some forum pages and searched the stackoverflow for the same thing, but I could not find the solution.

I used the code below to generate registration ID for GCM notification. But I get an empty string as a registration ID:

GCMRGISTARS; CheckDivis (this); GCMRegistrar.checkManifest (this);

if (gcmrgistarar.ICr registered (it)) {log d. ("Information", GCMRGistAir.Jet Registration Registration (this)); } regId = GCMRegistrar.getRegistrationId (this); Logs. V ("log", "register id oslo:" + regId); If (regId.equals ("")) {// This project ID GCMRAgstarber Replace it with the registrar (this, "718437041388"); Log D. ("Information", GCMRGistAir.Jet Registration Registration (this)); } Other {log d. ("Information", "pre-registered" + regId); }

Please help me with this, tell me that I have anything wrong.

Thanks in advance, Nirvana. must not have a registration ID after GCMRegistrar.register (this, "718437041388");

GCMIntentService.java that receives regId?
If yes, then you can get the registrar on inside GCMIntentService.java
  @Override registered at zero protected (references Context, string registration ID) {Log.i (tag, "Device Registered: regId =" + Registration ID); Log D. ("GCMIntentService", "In GcmIntent Service"); DisplayMessage (Reference, GetString (R.string.gcm_registry)); ServerUtilities.register (Reference, Registration ID); }    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -