If you are testing on an emulator - set the target of the emulator to Google APIs
- Push Manager
- Device Properties
Push Manager Push Manager
PushManager.init(getApplicationContext(), "YOUR GOOGLE PROJECT NUMBER", "YOUR PUSHAPPS APP TOKEN");
If you want to set your own Custom Id , set it before calling to init(), as seen here .
public static PushManager getInstance(Context context)
|The context in which the PushManager instance is initiated. It is recommended to pass your application context.|
Add a custom id to a device, it allows you to have another id for the device alongside the unique device id. If you want to use this feature, call this method before calling the init(Context, String,String) method
public void setCustomID setCustomId(String id, Context context)
the custom id for the user
Set the custom Id before calling init() or register.
App version App version
You can choose which identifier will be used as the device id.
The default is the device's IMEI if it accessible, but this means you will need to add the android.permission.READ_PHONE_STATE permission in the AndroidManifest.xml file.
use this method to select your desired source for the device id property
You must call this method before calling init(Context,String,String) for the first time, since init(Context,String,String) will register the device in our service and if change the id type later the device will be duplicated in our service. Furthermore, once choosing the identifier type it is obviously recommended to never change it again.
public void setDeviceIDType(DeviceIDTypes type)
the desired source for the device id property