Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the gps information in photo's exif on mobile #2112

Closed
st474ddr opened this issue May 23, 2024 · 3 comments
Closed

How to get the gps information in photo's exif on mobile #2112

st474ddr opened this issue May 23, 2024 · 3 comments

Comments

@st474ddr
Copy link

st474ddr commented May 23, 2024

Bug Report

Plugin(s)

Camera

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 6.0.0
  @capacitor/core: 6.0.0
  @capacitor/android: 6.0.0
  @capacitor/ios: 6.0.0

Installed Dependencies:

  @capacitor/cli: 5.7.4
  @capacitor/core: 5.7.4
  @capacitor/android: 5.7.4
  @capacitor/ios: 5.7.4

[success] iOS looking great! 👌
[success] Android looking great! 👌

Platform(s)

iOS, Android

Current Behavior

I can get exif from camera plugin after taking photos.
Here is what I got in iOS

ApertureValue: 1.3561438102252754
BrightnessValue: -0.7338042272044398
ColorSpace: 65535
CompositeImage: 2
DateTimeDigitized: "2024:05:24 02:41:14"
DateTimeOriginal: "2024:05:24 02:41:14"
ExifVersion: "0232"
ExposureBiasValue: 0
ExposureMode: 0
ExposureProgram: 2
ExposureTime: 0.03333333333333333
FNumber: 1.6
Flash: 16
FocalLenIn35mmFilm: 26
FocalLength: 4.2
ISOSpeedRatings: Array(1)
LensMake: "Apple"
LensModel: "iPhone 12 back dual wide camera 4.2mm f/1.6"
LensSpecification: Array(4)
MeteringMode: 5
OffsetTime: "+08:00"
OffsetTimeDigitized: "+08:00"
OffsetTimeOriginal: "+08:00"
Orientation: 1
PixelXDimension: 4032
PixelYDimension: 3024
SceneType: 1
SensingMethod: 2
ShutterSpeedValue: 4.906775184621625
SubjectArea: Array(4)
SubsecTimeDigitized: "293"
SubsecTimeOriginal: "293"
WhiteBalance: 0

And in Andriod, I only got height, width.

Expected Behavior

I could get GPS information.

Code Reproduction

    const image = await Camera.getPhoto({
      quality: 90,
      allowEditing: true,
      resultType: CameraResultType.DataUrl,
      saveToGallery: true,
    })

Other Technical Details

My permissions file
AndroidManifest.xml

 <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
    <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-feature android:name="android.hardware.location.gps" />

info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>$(DEVELOPMENT_LANGUAGE)</string>
	<key>CFBundleDisplayName</key>
	<string>OAcloud360</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>$(MARKETING_VERSION)</string>
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>oacloud360</string>
			</array>
		</dict>
		<dict/>
	</array>
	<key>CFBundleVersion</key>
	<string>$(CURRENT_PROJECT_VERSION)</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>LSSupportsOpeningDocumentsInPlace</key>
	<true/>
	<key>NSCameraUsageDescription</key>
	<string></string>
	<key>NSLocationAlwaysUsageDescription</key>
	<string></string>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string></string>
	<key>NSPhotoLibraryAddUsageDescription</key>
	<string></string>
	<key>NSPhotoLibraryUsageDescription</key>
	<string></string>
	<key>UIFileSharingEnabled</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UIViewControllerBasedStatusBarAppearance</key>
	<true/>
</dict>
</plist>

Additional Context

I have read many issues like #45, #1074

@ionitron-bot ionitron-bot bot added the triage label May 23, 2024
@ionitron-bot ionitron-bot bot removed the triage label May 23, 2024
@st474ddr st474ddr changed the title How to get the gps information in photo's exif How to get the gps information in photo's exif on mobile May 23, 2024
@alexgerardojacinto alexgerardojacinto added type: feature request A new feature, enhancement, or improvement needs reproduction labels Jun 7, 2024
@Ionitron
Copy link
Collaborator

Ionitron commented Jun 7, 2024

This issue needs more information before it can be addressed.
In particular, the reporter needs to provide a minimal sample app that demonstrates the issue.
If no sample app is provided within 15 days, the issue will be closed.

Please see the Contributing Guide for how to create a Sample App.

Thanks!
Ionitron 💙

@Ionitron
Copy link
Collaborator

It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

Have a great day!
Ionitron 💙

Copy link

ionitron-bot bot commented Jul 8, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants