Retrieve Device Registration
|Top Previous Next|
Backendless server returns information about device registration with the API documented below. The input parameter of the API is deviceId - the value returned by the device registration API.
public DeviceRegistration getDeviceRegistration() throws BackendlessException;
public void getDeviceRegistration( AsyncCallback<DeviceRegistration> responder );
The following errors may occur during the device registration API callThe following errors may occur during the device registration API call. See the Error Handling section for details on how to retrieve the error code when the server returns an error:
String applicationID = ""; String secretKey = ""; String version = ""; String gcmSenderID = ""; // this call must be somewhere early on in the application initialization Backendless.initApp( appContextOrActivity, applicationId, secretKey, version); DeviceRegistration devReg = Backendless.Messaging.getDeviceRegistration();