メインカメラというのは、スマホの背面にあるカメラの事です。メインカメラで撮影された画像限定で調べたいです。
public static MyExifEntity readExif(String filePath) {
MyExifEntity entity = new MyExifEntity();
try {
ExifInterface exif = new ExifInterface(filePath);
if (exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE) == null
|| exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE).equals(""))
return null;
entity.setFilePath(filePath);
entity.setLatitudeDegree(Gps.convertDmsToDegree(
exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE),
exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF)));
entity.setLongitudeDegree(Gps.convertDmsToDegree(
exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE),
exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF)));
entity.setDatetime(exif.getAttribute(ExifInterface.TAG_DATETIME));
entity.setOrientation(exif.getAttribute(ExifInterface.TAG_ORIENTATION));
} catch (IOException e) {
e.printStackTrace();
}
return entity;
}
--
このメールは Google グループのグループ「日本Androidの会」に登録しているユーザーに送られています。
このグループから退会し、グループからのメールの配信を停止するには android-group-j...@googlegroups.com にメールを送信してください。
このグループに投稿するには android-g...@googlegroups.com にメールを送信してください。
https://groups.google.com/group/android-group-japan からこのグループにアクセスしてください。
その他のオプションについては https://groups.google.com/d/optout にアクセスしてください。