Comments (8)
@joshgarwood, you are right, there is a problem with the documentation. As you suggest, the first method is the right one.
from awesome-cordova-plugins.
@4ware Are you talking about this plugin? https://github.com/transistorsoft/cordova-background-geolocation-lt
from awesome-cordova-plugins.
@keithdmoore It might be wiser to use https://github.com/mauron85/cordova-plugin-background-geolocation since the original plugin moved to some paid "premium" scheme now.
from awesome-cordova-plugins.
I'd like to try write a wrapper in my fork
However, I do not understand how can I test it with an app...
from awesome-cordova-plugins.
hey @vfdev-5
I see you added the interfaces for now. Next step would be to add wrappers for the functions, then add the plugin to index.ts.
Once you're done with that run npm run build_bundle
to compile the library and have something that you can import in a Cordova project and test.
from awesome-cordova-plugins.
Hi @ihadeed
I added wrappers for the functions and the plugin to the index.ts as you said. The compilation is OK and I 'tested' it with a demo application - ionic 2 version of this
What is the next step, pull-request, ... ?
from awesome-cordova-plugins.
@vfdev-5 yes if the functionality works submit a PR and I'll review & merge.
from awesome-cordova-plugins.
Is ionic-native now using this plugin instead of the one from mauron85? I recently got the latest ionic2 build (beta8), installed the mauron85 plugin, and imported ionic-native, but it looks like the configure function is now a promise instead of an observable:
var backgroundOptions = {
desiredAccuracy: 10,
stationaryRadius: 10,
distanceFilter: 30,
debug: false
};
// This seems to work
BackgroundGeolocation.configure(backgroundOptions).then((location) => {
// do cool stuff here
BackgroundGeolocation.finish();
}).catch((err) => {
console.log(err);
});
// this does not
BackgroundGeolocation.configure(
location => {
// do cool stuff here
BackgroundGeolocation.finish();
},
err => {
console.log(err);
},
backgroundOptions);
The documentation suggests that the second implementation should work. So I'm just trying to figure out the proper way to do this. Any help would be much appreciated.
Thanks!
from awesome-cordova-plugins.
Related Issues (20)
- Where to find real documentations? HOT 1
- Plugin bluetooth-le>RespondParams Interface> Missing optional property: address HOT 1
- download PDF file from external website with inappbrowser HOT 1
- Avoid `any` type and use tsdoc comment properly. HOT 1
- [BLE] Missing method `requestConnectionPriority`. HOT 1
- Creating Cordova Plugin HOT 1
- Add interface to diagnostic plugin HOT 1
- @awesome-cordova-plugins/local-notifications: getAllScheduled and getAllTriggered not working in Cordova HOT 1
- Is there any Unity3D plugin? HOT 1
- Plugin for Google Nearby Connections HOT 1
- social-sharing :: not working on onePlus device when share mp4 video. HOT 1
- Exception calling Diagnostic.requestBluetoothAuthorization method HOT 1
- Cannot find plugin.xml
- requestConnectionPriority() is missing in BLE plugin HOT 1
- @awesome-cordova-plugins/media seems not to work at all HOT 1
- @ionic-native/in-app-purchase-2 isnt compatible with billingclient v5 as required by Google to update apps HOT 1
- Where is @ionic-native/sqlite in awesome-cordova-plugins? HOT 1
- Can you add cordova-plugin-autostart please HOT 1
- in-app-browser: actually support browser platform
- in-app-browser: error WEBPACK_IMPORTED_MODULE_2__.InAppBrowser.create is not a function HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome-cordova-plugins.