Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23135][7_0_X] Fix Android: Ti.Geolocation.locationServicesEnabled return false #9682

Closed
wants to merge 2 commits into from

Conversation

maggieaxway
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-23135

Need manually test turning on/off the location service with the app running.

var win = Ti.UI.createWindow();

var btn = Ti.UI.createButton({
  title: 'Click Me'
});

btn.addEventListener('click', function(e) {

  console.log('Ti.Geolocation.hasLocationPermissions() ' + Ti.Geolocation.hasLocationPermissions());

  console.log('Ti.Geolocation.locationServicesEnabled ' + Ti.Geolocation.locationServicesEnabled);
  
  alert('locationServicesEnabled = ' + Ti.Geolocation.locationServicesEnabled);

  if (Ti.Geolocation.hasLocationPermissions()) {
    getCurrentPosition();

  } else {
    Ti.Geolocation.requestLocationPermissions(null, getCurrentPosition);
  }
});

function getCurrentPosition() {
  Ti.Geolocation.getCurrentPosition(function(e) {
    console.log('Ti.Geolocation.getCurrentPosition() ' + JSON.stringify(e));
  });
}

win.add(btn);
win.open();

@build
Copy link
Contributor

build commented Dec 13, 2017

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

🚫

Tests have failed, see below for more information.

Messages
📖

💾 Here's the generated SDK zipfile.

Tests:

Classname Name Time Error
android.Titanium.UI.WebView userAgent 6.356 Error: invalid userAgent

Generated by 🚫 dangerJS

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

@build
Copy link
Contributor

build commented Dec 20, 2017

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

🚫

Tests have failed, see below for more information.

Messages
📖

💾 Here's the generated SDK zipfile.

Tests:

Classname Name Time Error
android.Titanium.UI.Tabgroup Remove MapView from TabGroup 10.016 Error: timeout of 10000ms exceeded

Generated by 🚫 dangerJS

@hansemannn
Copy link
Collaborator

@ssjsamir This PR is marked for 7.0.1 but the ticket states 7.1.0, please check if we take this.

@ssjsamir
Copy link
Contributor

@hansemannn Looks like this wont be going in for 7.0.1 now but for 7.1.0 as marked in the ticket.

@hansemannn hansemannn closed this Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants