I tried this method and articles from Habr (the same code), in both cases I tested the genymotion on the emulator, everything works fine there, but I launched "Beeline Smart 3" on my device and coordinates are not obtained (although there is an icon). What could be the problem? (throws NullPointerExecption, the coordinates did not appear)
- 2Do you have an OS version 6 there, by any chance? .. - Yuriy SPb ♦
- On the Android 4.4.2 device, on the emulator too 4.2.2 (htc one x) - Vladimir Saleev
- I personally didn’t work with coordinates, but maybe it’s a long start for the GPS sensor ... Maybe if you catch an error, then after n time the coordinates will go. Also, maybe, it is not included on the device / emulator in the coordinates settings receiving. - JuriySPb ♦
- It works on the emulator, on the device there is no :) (it says in the settings that the application uses GPS) / 278945 and it will work. - Vladimir Saleev
- oneYes, this method of obtaining permits should help though, kmk, it should be required only with version 6 of the OS. But maybe it is done differently in new versions of lib or depends on targetSDK. Try lowering it to 21, for example. - YurySPb ♦
|