I am running my app on real devices just fine, but when I fire it up on the emulator it crashes with this message:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.travellers.app.android, PID: 6747
java.lang.RuntimeException: Unable to retrieve device. Invalid device ID.
at com.backendless.async.callback.BackendlessCallback.handleFault(BackendlessCallback.java:28)
at com.backendless.async.message.AsyncMessage$FaultHandler.handle(AsyncMessage.java:83)
at com.backendless.async.message.AsyncMessage.handleCallback(AsyncMessage.java:41)
at com.backendless.core.AndroidCarrier$1.handleMessage(AndroidCarrier.java:37)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
As this crash happens outside of my code, how can I resolve it? I want to prevent it from occurring on other devices. Is the problem that the Play Services are missing (they are missing indeed on that instance). And when I run it on my emulator with Play Services enabled, it works.
What exactly is it depending on? Can I expect your code to be running when a device can access my app through Google Play Store? (Because then they would have Play Services enabled, right?)
Okay so I guess I have to create a unique device ID first, right? What are the best practices for that, and why doesn’t the API do that for me? Is all of that somehwere in the docs?
actually … although having nothing changed the App now works. I mean I will not complain, but I am sorry for bothering you. I’ll let you know when it comes back one day. In that case: should I comment here or create a new question?