(Optional) Subscribe to get GCM push notifications.
In the onRegistered callback of GCMBaseIntentService, set the GCM registeration ID obtained from the google to the property d:AndroidGcmRegistrationId.
@Override
protected void onRegistered(Context arg0, String registrationId)
{
try
{
public static AppSettings appSettings = new AppSettings(clientConnection);
HashMap<String, String> fullConfig = new HashMap<String, String>();
fullConfig.put("d:AndroidGcmRegistrationId", registrationId);
appSettings.setConfigProperty(fullConfig);
}
catch(SMPException e)
{
Log.i("tag", "Error from update settings " + e.getMessage() + "Error code" + e.getErrorCode());
e.printStackTrace();
}
. }