How not to save a photo local? - android

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

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

How to display images in the mysql database like photo gallery in android?

Actually I am developing an android application to to store images after capturing the images from camera intent and need to display those saved images from the database?I stored the images in Blob format...
It's not recomended to save images into the database. The Blob format is good for storing amorphous data, but you need to do some serious tricks to convert it back into a Image format.
However, might we suggest instead to save the image on the local storage and store in the database only the identifier for the image?

Android Application Database to Save Images

I am very beginner in this developing android application. I developed one application already which captures image and detect face from it than save it in gallery of my mobile. Now i want to store this captured image in my own created database. So please guide me .
1) how to create my own database.
2) how to save captured image into this database.
3) Please let me know the procedure step by step.
The code that detect the face and all that stuff is here in this link.
http://www.edumobile.org/android/android-programming-tutorials/face-detection-example-tutorials-in-android/
Please guide me.
Check the below code
Android SQLite Database with Multiple Tables
and only save the image path to database
Create a table to save images.
For that there will be a auto increment column and another column
How To Save and Retrieve path image in SQLite android

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);

Categories

Resources