Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7391] Android: Ti.Geolocation.locationServicesEnabled is always false

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-02-14T16:06:54.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.0.1, Release 2.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsparity, tbs-1.9.0
ReporterNikhil Sharma
AssigneeOpie Cyrus
Created2012-01-24T18:16:02.000+0000
Updated2017-12-09T00:20:55.000+0000

Description

Ti.Geolocation.locationServicesEnabled always return false even when the Use wireless networks and Use GPS satellites are checked. alert('Please enable location services')

Repro Steps

Run the below code in the android device ``` var win = Ti.UI.createWindow({ backgroundColor:'white' }); if (Ti.Geolocation.locationServicesEnabled) { //Ti.Geolocation.purpose = 'Get your current location'; } else { alert('Please enable location services'); } win.open(); {\code}

Comments

  1. Nikolai Derzhak 2012-02-06

    This issue latest notification was not sent due to JIRA mail setting. Fixed now. Please check the issue for latests changes.
  2. Ping Wang 2012-02-14

    Can not reproduce with latest master. Please make sure to request user permission in AndroidManifest.xml (http://developer.android.com/guide/topics/location/obtaining-user-location.html#Permission)
  3. Lee Morris 2017-03-27

    Closing ticket as I am unable to reproduce this issue with the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80
  4. Bryant T. 2017-12-09

    This is happening for me on android 5.1.1. Meanwhile, android 6.0 and 6.0.1 both work perfectly.

JSON Source