Phonegap Android Geolocation watchPosition timeout

前端 未结 5 1623
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 10:11

I am using Cordova 3.0.0, A Samsung Galaxy S3 4.1.2 to test.

When I test the Phonegap full example for watching position : http://docs.phonegap.com/en/edge/cordova_g

5条回答
  •  春和景丽
    2021-01-03 10:45

    I did solve the problem adding this line to manifest:

    
    

    By default, CLI commands does not add this line to manifest.

    You must give permission to the app to get the position using wifi and cellphone antennas

    I was testing using this line but there was no difference:

    
    

    I already changed the time to get new position in file GPSListener.java located in app/src/org.apache.cordova.geolocation at this line:

    this.locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 60000, 0, this);
    

    I did changed 60000 for 2000, but there was no difference.

    My Device is i9300 with Android 4.3

    I hope this info can help somebody!

    Greetings!

提交回复
热议问题