Using background geo location plugin?


#1

Hi all!
I’m trying to use the BackgroundGeoLocation plugin with ionicframework. It’s usage says that it creates an object window.plugins.backgroundGeoLocation, however, after installing, this object is undefined whenever i run the code.
Has anyone ever dealt with this and can give some counsel?
Thanks everyone!


#2

@caleb_dre i have put the initialization code into $ionicPlatform.ready(), there it initializes correctly.


#3

Do you have good results on android with Background geolocation plugin? do you have any tips or code to share?

Thank you !! :smile:


#4

Have you seen http://ngcordova.com/docs/#BackgroundGeolocation it wraps the plugin your using in a service so it’s easy to use. I think it will work much better then trying to use the plugin directly because cordova plugins are usually not made with angular in mind.