Page 1 of 1

RegisterDevice token and deviceId

Posted: Fri Mar 14, 2014 12:53 am
by Tiago Ramos

This page (http://docs.appery.io/documentation/b...) lists token and deviceId as parameters for the api call, yet I cannot find any indication on how to obtain these values.


RegisterDevice token and deviceId

Posted: Fri Mar 14, 2014 12:59 am
by Alena Prykhodko

Hello Tiago,

The deviceId and token parameters are automatically generated device-side.
Please look through this section http://docs.appery.io/documentation/b...


RegisterDevice token and deviceId

Posted: Fri Mar 14, 2014 1:05 am
by Tiago Ramos

Does that mean I can leave these values empty and it will work properly?


RegisterDevice token and deviceId

Posted: Fri Mar 14, 2014 1:13 am
by Alena Prykhodko

Where exactly are you trying to fill with these values?

When you set up Pushes you do not need this information, but as soon as app is installed you'll have them in Database and then will be able to use in Services and so on.


RegisterDevice token and deviceId

Posted: Fri Mar 14, 2014 1:39 am
by Tiago Ramos

You mean to say the device is registered automatically even I don't directly add a register device service to my app?

My devices table has a custom column, and I'd like to set a default value to that when registering a device. How would I go about that?


RegisterDevice token and deviceId

Posted: Fri Mar 14, 2014 1:54 am
by Alena Prykhodko

[quote:]You mean to say the device is registered automatically even I don't directly add a register device service to my app? [/quote]
No, you should add the Service, but do not specify token and deviceId.

[quote:]
My devices table has a custom column, and I'd like to set a default value to that when registering a device. How would I go about that?[/quote]
In this case call the Update service.