Jesus Lozano
Posts: 0
Joined: Thu Jun 19, 2014 3:35 pm

How to register to a GCM Application and obtain my registration ID

Hello,
Just want to know how can I register my Android App to a GCM Application and in the process obtain the "registration ID" info, in order to provide that info to a 3rd Party Server. In that way, the 3rd Party Server will be able to send push notifications to the GCM Application and then the GCM Application will be able to relay that to me.
Please advice,
Jesus Lozano

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to register to a GCM Application and obtain my registration ID

Hi Jesus,

You can use ready mechanisms to send notifications:
http://devcenter.appery.io/documentat...

Diego Dillenburg Bueno
Posts: 0
Joined: Mon Oct 20, 2014 1:42 pm

How to register to a GCM Application and obtain my registration ID

I have the same doubt as Jesus above, and have read about the ready mechanisms, but is there any way to retrieve the RegistrationID that is provided from GCM to the device? Because I'm building a web app in a 3rd-party-server to handle those push messages, given also that I'm using another database, to post the push to Appery I would need to have both my DB and appery's db, wouldn't I?

Just wanted to know if I can retrieve this information anyhow.

Thanks in advance,
Diego Dillenburg Bueno

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to register to a GCM Application and obtain my registration ID

Hi Diego,

You can send push with from your 3rd party API with help of Appery.io "Push notification API".

Please take a look here about it: http://devcenter.appery.io/documentat...

Regards.

Diego Dillenburg Bueno
Posts: 0
Joined: Mon Oct 20, 2014 1:42 pm

How to register to a GCM Application and obtain my registration ID

Hello Yurii,

I'm aware of that, have read that documentation, but what I can't find is: can I push from my 3rd party API directly to GCM? Well, I mean, I know I can, but is there any way that I can grab from my app here in Appery the RegistrationID that is generated when my device registers in GCM? Is there any method? Or any variable storing that? Because for my purposes, I can't use the database we have here, in fact, I'm already requiring through JSON the data from a remote DB I have, and to use the push through the Appery API I'd have to hold another database with just the devices table here, right? Isn't there any way that I can get the GCM's Registration ID?

Thanks in advance,
Diego Dillenburg Bueno

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to register to a GCM Application and obtain my registration ID

Hi Diego,

Please try this code to info about push information:

pre

setTimeout(function() {
alert("pushNotificationDeviceID = " + localStorage.getItem('pushNotificationDeviceID'));
}, 1000);

Code: Select all

 alert("pushNotificationToken = " + localStorage.getItem('pushNotificationToken')); 

/pre

Regards.

Return to “Issues”