I am working on an app that uses the phones camera app, and on some phones the images is being saved to the gallery and on other phones not. Is there a way to make the camera app not save that image at all? I want to save the image another place, under another name and not visible in gallery(If possible). One idea iv'e come up with is to delete the image from gallery right after it leaves the camera app, but dont like that idea.
Related
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.
I'm using a chooser to allow the user to pick a photo from his gallery or take a new one using his camera (I copied the code from this answer).
Picking an image from the gallery works perfect. The problem is that when I capture an image with the camera It's not returning to the app and just stays in the confirmation screen...
I actually don't even need this screen to be displayed in the first place...
Can I somehow disable it or (if not) just make the Done button work?
Thanks in advance!
Can I somehow disable it
No.
just make the Done button work?
Contact the developers of your camera app, and point out the bug. Perhaps someday they will fix it.
You are using ACTION_IMAGE_CAPTURE. This launches a third-party camera app, to take a picture. There thousands of Android device models. These ship with hundreds of different pre-installed camera apps, and there are many more available for download from the Play Store and elsewhere. Any could be the one that handles a given ACTION_IMAGE_CAPTURE request, and any of them can have bugs.
I know how to make a preview and capture images inside an app.
However, I want to make a "capture mode". In this mode, the user may close my app and any pictures that get taken in other apps such as the default camera app get sent to my app, so I can make a gallery of them in my app.
I have an app which has a button that switches capture mode on and off, but how do I make it listen to camera events happening elsewhere? Would I have to search through the gallery for pictures taken in the time frame that capture mode was on?
Check out http://developer.android.com/reference/android/provider/MediaStore.Images.Media.html to find images located on the phone's internal or external storage during a specific time frame.
If you are doing any sort of work on these images, you could also investigate using a Service to ensure that your app can process the images while the other apps are running, but this hopefully won't be necessary.
I 'm working on a new apps for android , that ask the user about how many image he would like to capture, display all & then save.
The number of captured photos works correctly, but when I go to the display's layout only the one photo is shown, I tried "switch" instead of writing them all but nothing seems to work.
Is there any specific code may do that ?!
I have an app, let's call it FilterAppX
it basically let's you load an image, and I will customize it, say by adding a flower to it, or some silly items.
Now after processing the image, I will save it.
I want to be able to create a photo album to the default Gallery app that comes with all the android phones, so for Galaxy S2 for instance, there is an app (not dowloaded from appStore, it comes with the phone) called "Gallery", which it lets you choose many different images that you took with the phone, either from the camera just now, or screen capture, or whatever
so something like the screen shot below
so as you can see, this is a screen shot from default android phone on galaxy s2
i have downloaded some other apps, and it creates its own album that has the app's name, so i know it is possible and i am trying to do the same thing
basically i want a folder called "FilterAppX" which has the pictures taken by my map
how can i do this?
you just make your own folder that has photos made by "FilterAppX".
In case of you, the directory is "~/sdcards/FilterAppX".