Up until now, in order to use the SDK with Ionic, you had to fetch a reference from the
let bgGeo = (<any>window).BackgroundGeolocation;
No more: assuming the plugin has been added to
$ ionic cordova plugin add... already does), you can now simply
import BackgroundGeolocation from "cordova-background-geolocation"
From here on, the API for both React Native and Cordova are identical. They both share the same typescript definitions, so going forward from here, the only difference is where you
import "it" from.
Import interfaces as needed. On event-callbacks, for example:
All the SDK’s documentation has been migrated from the old markdown files into the
definition.d.ts files themselves, making it possible to auto-generate them using Typedoc and published to
Document-management is much simpler now and docs themselves more enjoyable to write with the easy linking throughout the API. Typedoc’s templating system is great and I’m importing my own custom template. The docs are sure to evolve from here on.
Now you have code-assist. For example, start typing "
Since the docs have been migrated into the SDK’s Typescript
definitions.d.ts, a snippet of the docs will appear on hovering members, such as
Method / event signatures: