2011-01-17 9 views

答えて

2

使用Location Provider

try { 
    LocationProvider lp = LocationProvider.getInstance(null); 
    if (lp == null) { 
     //Device doesn't currently have GPS enabled 
    } else { 
     //Device has GPS enabled 
    } 
} catch (LocationException le) { 
    //Device's GPS is currently permanently disabled 
} 

クレジット:aligf

Similar Question.

+0

これはかなり便利ですし、うまく動作するようです!ありがとう –

関連する問題