Developer/Android

[Android]위치정보 설정확인하기, 장소및보안에서 무선 네트워크 사용 확인하기, 장소및보안으로 넘어가기

블로blow 2011. 2. 7. 23:34
728x90

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



728x90