Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6623] SDK 9.2.1.GA Ti.Geolocation.requestLocationPermissions callback not called

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNot Our Bug
Resolution Date2020-10-29T14:59:22.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labels9.2.1.GA, bug, gps, location, titanium
ReporterLorenzo Piccinini
AssigneeAbir Mukherjee
Created2020-10-29T11:03:16.000+0000
Updated2020-10-29T14:59:22.000+0000

Description

SDK 9.2.1.GA Ti.Geolocation.requestLocationPermissions callback not called on both iOS and Android SDK 9.2.0.GA on iOS works fine. Android callback don't works form many sdk versions.
Ti.Geolocation.requestLocationPermissions(Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE, function(e) {
               Ti.API.info("requestLocationPermissions callback");
                
                if (e.success) {
                    Ti.API.info("success");
                } 
            });

Comments

  1. Lorenzo Piccinini 2020-10-29

    Request of permissions was in the main script (not alloy style) of window generation. Now I removed it from there and inserted into focus event’s window and now it works on IOS and Android too. Probably it was my mistake but something is changed switching from 9.2.0 to 9.2.1 SDK for iOS. On android instead it didn’t work even with 9.2.0 and earlier and I hadn’t noticed it.
  2. Rene Pot 2020-10-29

    To clarify for future visitors of this ticket: you need to call request for permissions AFTER you've opened your first window.

JSON Source