transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
656 stars 276 forks source link

Cannot import the plugin in cordova 12.0.0 #1448

Open ViniciusBenetti opened 1 week ago

ViniciusBenetti commented 1 week ago

Plugin version: from github Platform: Android OS version 13.0 Device manufacturer / model: XIAOMI POCO F3 Cordova version (cordova -v) android 12.0.0 Cordova platform version (cordova platform ls): 12.0.0

plugin provided for ready:

code:

var bgGeo = window.BackgroundGeolocation;
bgGeo.ready({
        allowIdenticalLocations:true

    }, function(state) {    // <-- Current state provided to #configure callback
// 3.  Start tracking
console.log('BackgroundGeolocation is configured and ready to use');
if (!state.enabled) {
  bgGeo.start().then(function() {
    console.log('- BackgroundGeolocation tracking started')
  });
}
})

Expected Behavior

console.log('BackgroundGeolocation is configured and ready to use');

Actual Behavior uncaught TypeError: Cannot read properties of undefined(reading'ready')

Steps to Reproduce

  1. cordova plugin add "https://github.cpm/transistorsoft/cordova-background-geolocation-lt.git"
  2. in config.xml i put exact alarm and androidX enabled only
  3. in Githubissues.
  4. Githubissues is a development platform for aggregating issues.