액티브 스킬/플러터
<플러터> 갤러리 사진의 gps 정보가 null 또는 0.0과 같이 제대로 넘어오지 않을 때
디벅잉
2023. 3. 5. 10:47
728x90
🧭
사진에 담긴 위치 정보
핸드폰으로 사진을 촬영하면 사진에 위경도 등의 위치 정보가 저장됩니다.
exif
exif 라이브러를 사용하여 사진의 위치 정보를 포함한 메타데이터를 읽어올 수 있습니다.
하지만 안드로이드에서 gps 좌표 정보가 null, 0.0 과 같은 결과를 얻게 되는 경우가 있습니다.
ACCESS_MEDIA_LOCATION
android > app > src > main > AndroidManifest.xml 파일에서 아래와 같은 uses-permission 을 추가 합니다.
<manifest ...>
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
<application ...>
</application>
</manifest>
다시 사진의 메타데이터를 읽어오면 정상적인 값을 확인할 수 있습니다.
📌
https://github.com/fluttercandies/flutter_photo_manager/issues/836
[BUG] In Android, getting the coordinates is null. · Issue #836 · fluttercandies/flutter_photo_manager
Describe the bug In Android, getting the coordinates is null. I created a camera roll in my app using your Package. For iOS, I was able to get each of the coordinates, but for Android, they both co...
github.com
728x90