LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);

locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1000L,1.0f, this);

if(!(locationManager.isProviderEnabled (LocationManager.NETWORK_PROVIDER))){

startActivityForResult(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS), 0);

Toast.makeText(class.this, "무선 네트워크 사용을 클릭해주세요 .", Toast.LENGTH_LONG).show();

}


참고

http://www.helloandroid.com/tutorials/calling-system-settings-android-app-gps-example




WRITTEN BY
블로blow
iOS 개발자 생활이야기

트랙백  0 , 댓글  0개가 달렸습니다.
secret