반응형
getFromLocation(double latitude, double longitude, int maxResults) 메소드가 API33에서 Deprecated되었다.
getFromLocation(double latitude, double longitude, int maxResults, android.location.Geocoder.GeocodeListener) 를 대신 사용하면 된다.
//Fetch address from location
geocoder.getFromLocation(latitude,longitude,maxResult,object : Geocoder.GeocodeListener{
override fun onGeocode(addresses: MutableList<Address>) {
// code
}
override fun onError(errorMessage: String?) {
super.onError(errorMessage)
}
})
https://developer.android.com/reference/android/location/Geocoder
Geocoder | Android Developers
developer.android.com
https://stackoverflow.com/questions/73456748/geocoder-getfromlocation-deprecated
Geocoder - getFromLocation() deprecated
I've received a message that this function (or it's constructor) has been deprecated. There's a new constructor of that function that accepts an additional parameter 'Geocoder.GeocodeListener liste...
stackoverflow.com
'IT > Android' 카테고리의 다른 글
안드로이드 스튜디오 / 안드로이드 스튜디오에서 하드코딩 string 찾기 (0) | 2023.06.22 |
---|---|
안드로이드 스튜디오 / 다국어 지원 string.xml 파일 생성하기 + chatGPT로 string파일 번역하기 (0) | 2023.06.20 |
안드로이드 / EditText text 위로 정렬 (0) | 2023.05.04 |
안드로이드 스튜디오 / GPT-3 API를 이용한 모바일 챗봇 만들기 (0) | 2023.04.13 |
안드로이드 스튜디오 / SOFT_INPUT_ADJUST_RESIZE deprecated (0) | 2023.04.07 |