Hello,
does anyone know if getCurrentLocation function is supported on android devices???
i am calling that but says me always UKNOWN.
THANKS. [import]uid: 185094 topic_id: 31845 reply_id: 331845[/import]
Hello,
does anyone know if getCurrentLocation function is supported on android devices???
i am calling that but says me always UKNOWN.
THANKS. [import]uid: 185094 topic_id: 31845 reply_id: 331845[/import]
I believe you mean the [lua]getUserLocation()[/lua] function, right? Yes, that function is supported on Android. However, it typically takes longer for Android to get a fix on your location via GPS compared to iOS, so you have to wait longer. That function will return an error until your Android device has a fix on your location.
To get your current location even faster, you’ll want to set the “android.permission.ACCESS_COARSE_LOCATION” permission in your “build.settings” file. This allows your app to retrieve current location from WiFi or via the cellular service.
Have a look at our API documentation for more details…
http://docs.coronalabs.com/api/type/Map/getUserLocation.html
Also, have a look at our sample project “Interface/MapView” that is included with the Corona SDK. [import]uid: 32256 topic_id: 31845 reply_id: 127514[/import]
I believe you mean the [lua]getUserLocation()[/lua] function, right? Yes, that function is supported on Android. However, it typically takes longer for Android to get a fix on your location via GPS compared to iOS, so you have to wait longer. That function will return an error until your Android device has a fix on your location.
To get your current location even faster, you’ll want to set the “android.permission.ACCESS_COARSE_LOCATION” permission in your “build.settings” file. This allows your app to retrieve current location from WiFi or via the cellular service.
Have a look at our API documentation for more details…
http://docs.coronalabs.com/api/type/Map/getUserLocation.html
Also, have a look at our sample project “Interface/MapView” that is included with the Corona SDK. [import]uid: 32256 topic_id: 31845 reply_id: 127514[/import]