Call requires permission which may be rejected by user. Code should explicitly check to see if permission is available. 오류 문구 입니다
현재 아래 코드에서 무슨 퍼미션 관련해서 에러가 나는데 이거 왜이런건가요?
(앱은 GPS로 위치를 가져오는 앱입니다)
예전에 비슷한 앱을 만든적이 있었는데 그땐 이와 동일한 코드로 오류없이 진행되었는데 지금은 안되네요..;;
뭐가 문제일까요?? ㅠㅠ
public void registerLocationUpdates(LocationListener listener) {
this.locationManager.requestLocationUpdates("network", 5000, 5.0f, listener);
this.locationManager.requestLocationUpdates("gps", 5000, 5.0f, listener);
}
public void unRegisterLocationUpdates(LocationListener listener) {
this.locationManager.removeUpdates(listener);
this.locationManager.removeUpdates(listener);
}