[AC-6596] Any option to enable GPS automatically
GitHub Issue | n/a |
Type | New Feature |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules, Titanium SDK & CLI |
Labels | n/a |
Reporter | Praveen Kumar |
Assignee | Abir Mukherjee |
Created | 2020-08-29T14:57:39.000+0000 |
Updated | 2020-09-03T11:20:00.000+0000 |
Description
Hello,
I am facing issue in some devices only is related to getting user current location.
In these devices Ti.Geolocation.locationServicesEnabled is value is false. So we have to manually enable the 'GPS' service.Have any option to automatically enabling the 'GPS'.
Like Android LocationRequest manager.
Attachments
Any updates!
I assume you mean iOS? No, that is not possible (even natively) due to system privacy restrictions. But if it is disabled, you can show an alert to open the system settings and then link them to the settings using:
See the [docs](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App.iOS-property-applicationOpenSettingsURL) for details.
No. it's in android. Facing the issue in some devices ( HTC - android 9 OS ) only. In my code, i ensure that Ti.Geolocation.hasLocationPermissions/Ti.Geolocation.requestLocationPermissions after that Ti.Geolocation.locationServicesEnabled return false. So we need to manualy enable GPS service. So looking functionalities of LocationSettingsRequest.Builder in android native