Backendless Support
 
Not a Problem

Problem with receive push in some devices with '0123456789ABCDEF' serial number.

I have a problem with some devices that have "0123456789ABCDEF" Serial Number. This is my code for register device:

  1. Backendless.Messaging.registerDevice(GCMSenderId, channels, date, new AsyncCallback<Void>() {

    @Override

    public void handleResponse(Void arg0) {

    Log.i("GCM", "OK");

    }

    @Override

    public void handleFault(BackendlessFault arg0) {

    Log.i("GCM", "=" + arg0.getMessage());

    }

    });

Registration work well but these device don't receive push notifications. Although it's work very well in other devices with real Serial Number.

Leave a Comment

Comments (4)

photo
1

Hi Reza. Push notifications work only on real devices. Not virtual

photo
1

I know that, but they are real devices. Most of them have Android 4. I have 10,000 users and 500 of them have this problem. I had a research and find their serial number is the same, and it's "0123456789ABCDEF"

photo
1

In order to receive push notification, device serial should be unique.Try to set a unique value to Backendless.Messaging.DEVICE_ID before registering the device :

  1. private static final String DEFAULT_SERIAL = "0123456789ABCDEF";

  1. if (Backendless.Messaging.DEVICE_ID.equals(DEFAULT_SERIAL) {
  2. Backendless.Messaging.DEVICE_ID = UUID.randomUUID().toString();
  3. }

Hope it helps

photo
1

Thank you very much Vitaly. It was the answer that i was looking for.

photo