I'm working on an app which needs location updates. So i followed the official tutorial and run the app on my development device. GPS is activated and everything should work, but onLocationChanged() is never called.
Then I run the app on my personal smartphone and everything worked as expected. So I began thinking about the differences between my development and my private device. The most distinguishing features of my development phone are:
- no SIM card
- no Google account is linked
- no WiFi available => no Internet connection
Number 3 already forced me to download the latest Google Play Services apk from a mirror and installing it manually. Is there something else I have to do to enable my development phone to use the location service?
Specs of my development device:
Samsung Galaxy S7
Android 7.0
Google Play services 10.2.99
EDIT
As @EugenPechanec pointed out, relying on GPS only needs a GPS connection, so to be outdoors is really helpful. Turning my private phone's flight mode on and only activating GPS led me to the same result as with the development device. Placing it by the window got me a position 1/3 times with it and 0/3 times with the development device. So this seems very legit. Thanks a lot for this reminder on GPS ;)