Closed zsgithublib closed 5 years ago
After converting the simple map example to Ionic 4, the import function fails, with an error
import BackgroundGeolocation, { Location, HttpEvent, HeartbeatEvent, MotionActivityEvent, ProviderChangeEvent, MotionChangeEvent, ConnectivityChangeEvent } from "cordova-background-geolocation-lt";
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'onLocation' of undefined TypeError: Cannot read property 'onLocation' of undefined at Function.push../node_modules/cordova-background-geolocation-lt/src/ionic/index.js.BackgroundGeolocation.onLocation (index.js:181)
(See attached filed)
What is the proper way to import this plugin in Ionic 4?
tab4.page.ts.zip
This is not the Cordova plugin repo. This is the SampleApp repo.
https://github.com/transistorsoft/cordova-background-geolocation-lt
After converting the simple map example to Ionic 4, the import function fails, with an error
import BackgroundGeolocation, { Location, HttpEvent, HeartbeatEvent, MotionActivityEvent, ProviderChangeEvent, MotionChangeEvent, ConnectivityChangeEvent } from "cordova-background-geolocation-lt";
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'onLocation' of undefined TypeError: Cannot read property 'onLocation' of undefined at Function.push../node_modules/cordova-background-geolocation-lt/src/ionic/index.js.BackgroundGeolocation.onLocation (index.js:181)
(See attached filed)
What is the proper way to import this plugin in Ionic 4?
tab4.page.ts.zip