Hi, I’ve been trying to send a message between two emulators(both Genymotion) but I can’t do it because at the moment of retrieving the registration for push notification I always get “Unkown device Id”. Then I can register the first emulator but when i try to register the second I get the handle response(so I guess all is fine) but when i see the device registered in the console I only see one (the first). Googling I found you use Serial Number of the device as device ID but in my case both serial number in the Genymotion emulators are “unknown” so I guess that is the problem.
My question is: Is it possible that in the next update we can use emulators for test messaging. I think is simple,in the code:
String id=Build.Serial;
if (id==null || id==""){.....
Just Add:
String id=Build.Serial;
if (id==null || id=="" || id.matches("unknown")){.....
It works perfect. I use this code(because both emulators are cloned from the same virtual device in genymotion so both get the same deviceId with your code):