How to improve GPS location Accuracy in Android

前端 未结 3 1484
攒了一身酷
攒了一身酷 2020-12-14 12:53

Hi im working on an app that uses GPS location. My testing devices are Nexus One and Htc Mytouch 3g Slide.

So does anyone know how to improve the GPS location accura

3条回答
  •  粉色の甜心
    2020-12-14 13:36

    Since API 9 you can use some constants for the setAccuracy method

    lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    Criteria criteria = new Criteria();
    criteria.setAccuracy(Criteria.ACCURACY_HIGH);  
    lm.getBestProvider(criteria, true);
    

    ACCURACY_HIGH less than 100 meters
    ACCURACY_MEDIUM between 100 - 500 meters
    ACCURACY_LOW greater than 500 meters

    here are the details

提交回复
热议问题