Determining whether selected image originated from device camera - android

Images on the Android device can originate from many different sources - from the device camera, from an external SD card, from an e-mail, synced from another system. I'm developing an application which uploads images from an Android device to a web application. It turns out that the web application can perform some significant optimizations if it can be determined that the uploaded image originated from the device's camera.
I guess that this would have to be done at the point that the Android application user selects the image from those presented in the picker. At that point, the Android application has an image in hand. Is there image metadata available, and, if so, would it include a marker which indicates that the image originates from the device's camera?
Thanks for any thoughts.
Peter Hornby

Peter,
If you view the EXIF data for the JPEG you should be able to see the camera type it was taken with. On my droid it says "Motorola Droid" for the camere type.
Here is a link to an android class for reading EXIF data: http://android-er.blogspot.com/2009/12/read-exif-information-in-jpeg-file.html

Related

Can two apps use camera at the same time in android phone?

Or is it impossible no matter how you build or code apps?
I am saying in android version 5.0
Which was released 2014-2016.
I mean if when one app is using camera in “background” , is using another camera app at the same time possible??
Some people say it depends on how the applications is coded.
Also the app “sound assistant” makes 2 music apps using speaker at the same time.
Then how about camera???
And i saw a comment saying
“Our current frame work does support limited support for multi-app access to the camera.
We allow one (and only one) "controlling" app to the camera, but an arbitrary number of "shared" apps to access the same camera.
There are some limitations for "shared" apps:
No camera controls Exposure/White
Balance/Focus, etc...).
No media type selection (can't choose VGA vs.
720p vS. 1080p, etc...).
Only access to a video stream by default, photo pins are blocked (any photo operation will use a video frame instead).
The "controlling" app decides what media type to use and can set any camera control. Any of the sharing app can register to be notified if a controlling app releases control of the camera, at which point, the sharing app can re-open the camera in controlling mode.
The mechanism described above does not require any copying of the captured frame so the overhead is minimal.”
What this comment means? does it say 2apps can access to camera at the sametime anyway in android??
Any way thanks for reading and I want to know if the phone is rooted , this can be possible
thank you for reading !

Replace an image for API Camera Internal

I have an API integrated application that calls the Internal Camera API. The application can then use the camera to capture with the interface inside that application. But now I want to use a previously taken photo, instead of the app taking a photo with the camera, when I press the shutter button on that app, it will record the photo I selected first.
Any ideas for the above problem? I don't want to mention the android virtual machine as that has a rather high requirement for hardware.
I have some ideas like Fake Camera software but it only applies to apps that call Android System Camera apps and not apps that use Internal Camera API. I also have an idea about using my pc to make a device that can pass an image to the Internal Camera API on the android device. But I am not knowledgeable enough or there is no software that can meet that requirement.
I think with the growth of the stackoverflow community, I can get my answer to this problem.
Thank you for reading my question.

image auto saves to device picture album

I have a multi platform app - iOS and Android.
One of the features in the app is to capture images. I have a toggle switch in the app settings which allows the user to save the image to the device picture album if the switch is enabled.
This is an issue I can only produce in Android. Even without the toggle switch enabled, the captured photos still save to the device. I have tested this on Android 4.4.2 and 6.0
It does not do this in iOS.
There is nothing in my code to suggest that the photo should still be saved, I have checked it over and over.
Has anyone else come across this? If so what can be done to rectify the issue?
Thanks,
This is simply how FireMonkey captures images on Android. It saves a captured image to a file before handing the pixel data to you. And it does not provide access to the captured image's filename so you can remove the file afterwards.
FireMonkey has an IFMXCameraService interface with a TakePhoto() method, which accepts a NeedSaveToAlbum option:
Taking Pictures Using FireMonkey Interfaces
However, it is currently broken on Android:
RSP-13118: [Android] TTakePhotoFromCameraAction saves Image on Disk unexpectedly
RSP-15820: IFMXCameraService TakePhoto , NeedSaveToAlbum False not working
Until that is fixed, you could use JNI to access Android's camera APIs directly, then you can do whatever you want with the images.

Sony Camera API to set the meta tags from the Android App

I am using the Android SDK for Sony Camera and its working fine, and wanted to send additional settings from App to camera image to Adding meta tags like Author, Tags or even GPS coordinates.
My Question
Is there any way to send additional parameter settings to the Camera pictures.
Alternatively Can I get the copy of the recent picture to Mobile App and changes these.
There's no availability within the API to send that kind of meta data to the camera.
Therefore you would have to get a copy of the picture to the phone, and put the meta data on the image within your app.

mergAndroid - Can I specify the image optimization when sharing a photo using mergPopActivity?

I'm using mergPopActivity on Android to share pictures taken with the device camera. When composing an email message with mergPopActivity I get an attachment of 5MB which is the maximum allowed by the Kindle FIre. When sending the same picture with the standard photo album of the device, the file size is of 200/300 KB. Is there in mergPopActivity a way to specify the optimization of the images?
It only shares what you give it at the moment although something linked that could be added.

Categories

Resources