Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-6403

Ti.Geolocation.hasLocationPermissions() is undefined

    Details

      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

          Activity

            People

            • Assignee:
              ybanev Yordan Banev
              Reporter:
              Pietro Pietro Granati
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration