Avoid android camera save by default - android

i want to know if it's posible to avoid camera intent to saving the pic to the image gallery. i want to add the pic only in the internal storage, so i don't want the pic save twice on my device. Or other thing will be, delete the pic after.

During R&D i found this ,it will defiantly solve your problem.
Deleting a gallery image after camera intent photo taken

Related

How do I avoid saving captured image in my device?

I have to create functionality for an application where I have to take pictures and save it to a SQLite database. I have implemented the camera for now using the camera intent in android, but the image gets saved to the gallery. I have read the Camer2 and CamerX API documentation and the image still gets saved to a device folder. Is there any way to avoid this?
You can checkout https://stackoverflow.com/a/64651558/277368 on how to get in-memory image with CameraX. Then you need to serialize the image and save it to SQLite on your own.

Cordova camera changes filename after saving to gallery on iOS

i am using the cordova camera plugin and saving images to the gallery/photos so they don't delete as prior to this my photos would be saved to the cache and delete quickly enough.
I attach the images i take and save with camera plugin to an email.
What i do is save the ImageURI from the camera function to localstorage to be called again if i resend the email at a later date.
This method works in the short-term and images attach successfully but not after a few hours.
The imageURI of captured images is usually on the format of cdv_photo_001.jpg for example.
However, the images are saved in photos/gallery and the filenames tend to be normal "IMG_0001.JPG" format and don't attach to the email.
is there a way i can get the actual gallery name while taking a picture.
Ive tried to save the image persistently using some guides but i could never get the moveTo to work.
Anyone any ideas?
Thanks

Accessing Photo File

I use the standard TTakePhotoFromCameraAction in my application in order to take a photo.
What I would like to do, is when the user closes the application and then open it again, the last taken photo to be uploaded.
I know how to use SharedPreference in delphi, but I don't know what is the filename & path of the photo it self!
Any clues?
The TTakePhotoFromCameraAction.OnDidFinishTaking event gives you a Bitmap of the taken photo. It is then your responsibility to save it where and how you need it. TTakePhotoFromCameraAction does not save it for you.
There is a sample showing you how to do it coming with delphi samples:
C:\Users\Public\Documents\RAD Studio\12.0\Samples\FireMonkeyMobile\PhotoEditorDemo

How to avoid saving picture at gallery or delete it automatically in Android?

The device is Samsung Galaxy III. I developed an APP to run the camera activity and capture an image. After analyzing the image, I print out some text information. Right now every captured image is saved at gallery. I don't need the image to be saved in gallery or SD card. I think either of the following two solutions will work for me, but I don't know how to program it:
avoid saving pictures to gallery.
delete the picture somewhere in the APP.
Any comments are appreciated.
Read Android Camera tutorial.
...
Storage - Are the images or videos your application generates intended to be only visible to your application or shared so that other applications such as Gallery or other media and social apps can use them? Do you want the pictures and videos to be available even if your application is uninstalled? Check out the Saving Media Files section to see how to implement these options.
or see this one: How to save image captured with camera in specific folder.
In the Camera intent when starting, add this:
intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(getTempFile(context)));
I solved my problem with following two steps:
as '#auselen' pointed, save all the images to a specific folder. How to save image captured with camera in specific folder.
delete all the images in that folder somewhere in the APP. How to Delete Image From SDCard in Android
use this for delete a pic
ImgPhoto1.setImageBitmap(null);

How not to save a photo local?

for my android application,I need to take a photo with the built-in camera and save it to a database in a blob field.
I can take a photo and save it to a blob field, but the device also saves the photo local. To avoid the device filling with photos, I don't want to save the photo local on the device, only in the db.
I'm using Android 2.3.3, my test device is a Samsung Galaxy S II with default photo-application.
How can I do this?
Thanx,
Robby
You could write an own Activity to take the pictures.
http://developer.android.com/reference/android/hardware/Camera.html
As I read you don't have to save your pictures there.
After capturing photo using camera you can store the image in database using blob file. After storing in database is done you can delete the photo from that path.
Thanks
Deepak

Categories

Resources