문제

I have been trying to get the following code to work for the last 4 hours.

public void clearLocation() { 
    LocationManager locMan =
            (LocationManager)getSystemService(Context.LOCATION_SERVICE); 
    locMan.clearTestProviderLocation("gps"); 

My problem is that it will only work with Android 1.5. On 1.6 and newer it just crashes when it reaches the second statement.

I've been looking through various code snippets and tutorials, but haven't been able to find anything about this.

Regards, Adam.

도움이 되었습니까?

해결책

Well... found out that you can't change anything about the location provider "gps" in 1.6+

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top