(problem) $cordovaGeolocation backgroundservice on android 6.0.1 (marshmallow)


I have problem with $cordovaGeolocation.getCurrentPosition() which is running as backgroundservice using cordova.plugins.backgroundMode on my android device marshmallow (6.0.1), it’s always return object PositionError : error.Code:3 error.Message: timeout.

this problem doesn’t appear on my android device version kitkat (4.4.2).

does anyone have this similliar problem? please help me…

here mycode:

  $scope.updateposition = function() {
     var posOptions = {timeout: 60000, enableHighAccuracy: true};
    .then(function (position) {
      var lat  = position.coords.latitude;
      var long = position.coords.longitude;

      var GPS = "latitude:"+lat+";"+"longitude:"+long;
      var d = new Date();
      var n = d.toLocaleString();

              console.log('update position success');
                                                                title:'update position success on '+n
            console.log('update position failed');
                                                                            title:'update position failed on '+n
      return $scope.GPS;
    }, function(err) {
      // error

      console.log('fail get location'+err);
      console.log('fail get location detail:'+err.code+' '+err.message);
                                                                      title:'fail get location '