Hi, I have 2 questions. First, I run this code below, for some reason device gets 4 push notifications whenever I run this.
DeliveryOptions deliveryOptions = new DeliveryOptions();
deliveryOptions.addPushSinglecast(deviceIdtoPush);
PublishOptions publishOptions = new PublishOptions();
publishOptions.putHeader( PublishOptions.ANDROID_TICKER_TEXT_TAG, getString( R.string.app_name ) );
publishOptions.putHeader( PublishOptions.ANDROID_CONTENT_TITLE_TAG, getString( R.string.app_name ) );
publishOptions.putHeader( PublishOptions.ANDROID_CONTENT_TEXT_TAG, "Liste Görüntüleme Onayı" );
Backendless.Messaging.publish( "default", Message, publishOptions, deliveryOptions, new BackendlessCallback<MessageStatus>()
{
@Override
public void handleResponse( MessageStatus response )
{
}
@Override
public void handleFault( BackendlessFault fault )
{
}
} );
My second question is I get deviceIdtoPush string from the code below. And sometimes I get device token not device Id from the same code.
Backendless.Messaging.getRegistrations(new AsyncCallback<DeviceRegistration>() {
@Override
public void handleResponse(DeviceRegistration devReg) {
// TODO Auto-generated method stub
GCM_RegisterId=devReg.getDeviceId();
}
@Override
public void handleFault(BackendlessFault arg0) {
// TODO Auto-generated method stub
}
});
Thanks in advance.