Background Geolocation Problem

I want to use plugin to send GPS lat long to firebase, but it seems that the plugin does not work. I cannot get the GPS based on the sample code below:

module.controller(‘MyCtrl’, function($scope, $cordovaBackgroundGeolocation) {

var options = {

document.addEventListener(“deviceready”, function () {

// `configure` calls `start` internally
  null, // Background never resolves
  function (err) { // error callback
  function (location) { // notify callback

$scope.stopBackgroundGeolocation = function () {

}, false);

Has anyone tried before?


Any solutions? Please help!

i need help with this as well a sample example whould be nice