IllegalArgumentException thrown by requestLocationUpdate()

前端 未结 2 1122
臣服心动
臣服心动 2020-12-19 03:58

We recently tested our application against android API level 14 and 15. We started development targeting minimal SKD Version 8 and excluding tablets (3.x).
With 2.x ever

2条回答
  •  清酒与你
    2020-12-19 04:11

    locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 300000, 500, locationListener);
    

    In your code use this LocationManager.NETWORK_PROVIDER when you testing that make sure that the network you are using like WIFI is available or you are inserted sim card in your device and network is available on it.

    You may also test using LocationManager.GPS_PROVIDER but make sure before use that GPS is ON of device

提交回复
热议问题