Geolocation cordova Android plugin does not work

I am developing an application which 70% of it is based on geolocation. I began to develop in the iOS and everything works great, I had some problems but nothing that is not solvable logically. Now, I was asked a version for Android, at first impression, everything works identical to iOS, but when the testing version that give me problems arose geolocation. The problem is that being off the GPS from the phone (I tested Samsung, Xperia, Motorolas) fall into the error function (which I defined) to alert the user that the GPS was off and that should enable it to occupy. However, activating it, it does not work well, restart the computer to work correctly recently, I'm crazy, because even I get an error response, or alerts you leave, or anything like that.

My code :

$scope.$on('$ionicView.enter', function(){
 $(function(){
  document.addEventListener("deviceready", onDeviceReady, false);
 })

 function onDeviceReady() {
  navigator.geolocation.getCurrentPosition(onSuccess, onError);
 }

 function onSuccess(pos) {
  $scope.latitud = pos.coords.latitude
  $scope.longitud =  pos.coords.longitude;
  console.log(pos.coords.latitude);
  $scope.mostrar_cercanos = true;
  $scope.getViews();
 }

 function onError(error) { 
  $scope.mostrar_cercanos = false;
  $scope.mostrar_mensaje_gps = true;
  $scope.mensaje = "El GPS de su telefono no se encuentra activado";
 }
})

Plugins :

org.apache.cordova.geolocation 0.3.12 "Geolocation"
org.apache.cordova.inappbrowser 0.6.0 "InAppBrowser"
org.apache.cordova.network-information 0.2.15 "Network Information"
org.apache.cordova.splashscreen 1.0.0 "Splashscreen"

I have to go back to iOS mention that everything works as I want.

I would recommend you to use ngcordova.

http://ngcordova.com/docs/plugins/geolocation/

I have used this in my application and it worked fine.

Good luck!