[AC-6197] Titanium.Geolocation.getCurrentPosition is giving error
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Resolved |
| Resolution | Needs more info |
| Resolution Date | 2019-04-22T22:28:08.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | android |
| Reporter | pravsrivastava |
| Assignee | Shak Hossain |
| Created | 2019-04-04T16:47:07.000+0000 |
| Updated | 2019-04-22T22:28:08.000+0000 |
Description
I am developing an app with the geolocation services and there is no problem with iOS, however when I try to test it on Android, a location error occurs.
[ERROR] : GeolocationModule: (main) [39266,89619] Unable to get current position, location is null
I am using SDK 7.5.0GA and Android Samsung Galaxy S7 (8.0)
Hi [~pravsrivastava], please try to build your project with latest ti sdk 8.0.0.GA which can be downloaded with the command: appc ti sdk install latest Let us know if you still experience the same in latest builds. Thanks!
getCurrentLocationreturns a cached location. If you have not monitored for location yet you will not get a location. Use Ti.Gelocationlocationevent to start monitoring for the location. See docs: https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Geolocation-event-location Also, includeti.playservicesmodule to enable better geolocation supportHello [~pravsrivastava], did you followed Rene's guide above? let us know how things going.
Hello, Did you able to find this issue resolved ? Let us know the current status of your issue whether the provided workaround was helpful or not.