Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25797] Android: Remove unnecessary Google Play Services logs

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-03-21T21:42:51.000+0000
Affected Version/sRelease 7.1.0
Fix Version/sRelease 7.1.1
ComponentsAndroid
Labelsn/a
ReporterLokesh Choudhary
AssigneeGary Mathews
Created2018-02-22T21:47:33.000+0000
Updated2018-03-23T11:51:11.000+0000

Description

Steps to reproduce:

1. Use the code below in your app.js:
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();
2. Make sure you do not have ti.playservices module in your app. 3. Build the app on Android device/emulator. (I saw the logs on Nexus 6P Android 8.0 & Android 4.4.4 emulator). 4. After app launch tap click me button. 5. Allow location permissions. 6. Check the logs.

Actual results:

1. These info logs are seen : https://gist.github.com/lokeshchdhry/bc231d92727852c4a74f8f37e3465d53

Expected results:

1. The info logs should not be logged.

Comments

  1. Gary Mathews 2018-02-22

    -master:- https://github.com/appcelerator/titanium_mobile/pull/9876
  2. Gary Mathews 2018-03-20

    master: https://github.com/appcelerator/titanium_mobile/pull/9950
  3. Lokesh Choudhary 2018-03-20

    [~gmathews], Can you please provide a backport.
  4. Gary Mathews 2018-03-20

    7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9951
  5. Lokesh Choudhary 2018-03-21

    FR Passed. PR's merged.
  6. Samir Mohammed 2018-03-23

    Verified in SDK Version 7.1.1.v20180322144031 and 7.2.0.v20180322112525. Test and other information can be found at: 7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9951 Master: https://github.com/appcelerator/titanium_mobile/pull/9950

JSON Source