Propo41 / aust_travels

A bus tracking application where users can track their university bus based on the location data shared by volunteers

Home Page:https://play.google.com/store/apps/details?id=com.pixieium.austtravels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some devices cannot share their location data

Propo41 opened this issue · comments

try changing provider
val location = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER)

This was released mid 2017 by Google.

Google Play services location APIs are preferred over the Android framework location APIs (android.location)

If you are currently using the Android framework location APIs, you are strongly encouraged to switch to the Google Play services location APIs as soon as possible.

Finally found a fix using google codelabs. Totally amazing ^^ https://codelabs.developers.google.com/codelabs/while-in-use-location#0 . How did it take me so long to find it? :)