[AC-6403] Ti.Geolocation.hasLocationPermissions() is undefined
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2019-10-21T15:20:40.000+0000 |
Affected Version/s | Appcelerator Studio 4.5.0 |
Fix Version/s | n/a |
Components | Appcelerator CLI, Appcelerator Modules |
Labels | android, geolocation, permissions, sdk-8 |
Reporter | Pietro Granati |
Assignee | Yordan Banev |
Created | 2019-10-11T10:50:12.000+0000 |
Updated | 2019-10-21T15:20:40.000+0000 |
Description
This happens on Android
I've updated my app from SDK 7.5.0 to SDK 8.2.0
Ti.Geolocation.hasLocationPermissions(Titanium.Geolocation.AUTHORIZATION_WHEN_IN_USE)
returns undefined
instead of true/false.
It has been working for years.
If I create a fresh app with just this request and SDK 8.2.0 everything works.
I'm trying to find which modules causes this.
I've these modules added:
dk.napp.drawer
ti.cloud
com.drtech.altbeacon
bencoding.android.tools
ti.nfc
ti.paint
ti.map
com.rkam.swiperefreshlayout
ro.mihaiblaga.imei
ti.barcode
yy.logcatcher
ti.animation
ti.identity
org.iotashan.TiTouchImageView
Tested with 8.2.1.v20191010112656 undefined still present
Update:
I've rolled back to 7.5.1 to going on with the development but now it crashes
[ERROR] : TiExceptionHandler: (main) [640,1333] /alloy/controllers/index.js:1351
[ERROR] : TiExceptionHandler: gps_autorizzato: Ti.Geolocation.locationServicesAuthorization == Ti.Geolocation.AUTHORIZATION_DENIED ? false : true } });
[ERROR] : TiExceptionHandler: ^
[ERROR] : TiExceptionHandler: TypeError: Cannot read property 'locationServicesAuthorization' of undefined
Update 2, using 8.2.0 I saw that throws an error:
[ERROR] : V8Exception: Exception occurred at /alloy/controllers/index.js:3526: Uncaught Error: Attempt to invoke virtual method 'boolean ti.modules.titanium.geolocation.TiLocation.isProvider(java.lang.String)' on a null object reference
Update 3 and Fix!
Thank to Yordan we found that I was using ti.playservices 16.1.15 that causes all that trouble
Attachments
File | Date | Size |
---|---|---|
appc_info_20191014.txt | 2019-10-14T09:38:40.000+0000 | 21379 |
Hello, on iOS with SDK 8.2.0 with permission granted on my device:
I get on log: [ERROR] Script Error { [ERROR] column = 54; [ERROR] line = 1449; [ERROR] message = "undefined is not an object"; When I downgrade to 8.1.0.GA all works like a charm.
[~jgiunta], If you use ti.playservices module then try to change the version to fix this issue. Thanks!