Android :: Save Data From Camera To Disk Using MediaStore On Android?

Mar 16, 2009

I'd been using my own Camera class for taking images and my own database but soon enough I couldn't really keep up with changes and I decided to use the built in camera application in Android to do the job, but I can't seem to get it to save file. What am I missing here? The application seems to save the file but it's just 0 bytes. I looked up the source code of the Camera application and it's looking for the "output" in Extras to save the file.

Public class CameraTest extends Activity {
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {


Android :: Small Picture Retrieved From Camera Although Specified MediaStore.EXTRA_OUTPUT In 2.X

May 7, 2010

I just don't get it: when I use the camera with an intent and also specify an output file, the returned image is always very small on many devices (e.g. Motorola Milestone 2.1, HTC Desire 2.1, Emulator 2.1, Emulator 2.0.1) but not on all (e.g. Nexus One). Here's what I do to bring up the camera app:

private final static String TEMP_PHOTO_FILE = Environment.getExternalStorageDirectory() + "/TEMP_PHOTO.JPG"; ..............

View 1 Replies View Related

Android :: Save Canvas To Disk

Sep 22, 2009

I am doing a painting program (KIds Paint - you can find in Android Market) and I have a lot of requests to save the content on disk or to wallpaper. I have been searching around but cannot find solution. My guess is that I probably wanted to get the bitmap from the canvas, but I can't find ways to get it. Then I try to set an empty bitmap into the canvas and draw on the canvas, and save the bitmap... but I got an empty bitmap..........

View 7 Replies View Related

Android :: Full Size Image Back From Camera Using MediaStore.IMAGE_CAPTURE?

Jan 8, 2010

I managed to figure out how to get the camara application to give me an image, but it is rather tiny, only 18k. Has anyone figured out a reliable way to get a full-sized image returned if you are using a MediaStore.IMAGE_CAPTURE intent?

View 2 Replies View Related

Sprint HTC Hero :: Save People Contacts On Disk

Aug 4, 2010

I want to save my contacts onto my computer hard drive. Where on disk is the file responsible for saving all the contacts?

View 4 Replies View Related

Android :: Activity / Process Lifecycle - Save / Load Data To / From Disk

Nov 26, 2009

My app is made of two activities, A and B. I'm considering this sequence of steps: Activity A is started. A launches B [A is paused, B is running]. B launches a map intent [A and B are both paused now]. Now the user is using the maps application and the system decides it needs more memory. Can the system kill only one of my activities for memory, or will it always kill all activities in a "process" in this situation?

Both activities share some static data like:

class Data {
public static String mName;
public void save() {
// write to file: mName;...................

View 1 Replies View Related

Android :: How To Measure Disk Activity And Disk

Mar 18, 2009

how to measure Disk Activity and Disk Usage on android ? Unfortunately iostat is not available in Android. I would like to monitor Data read and Data written for disk activity and Utilized and Free space for Disk Usage. I found diskstats but I don't know how to read it.

View 2 Replies View Related

Jelly Bean :: Disk Drive Mount As Disk Drive

Nov 2, 2013

my mobile samsung galaxy note 2 , i need this feature in htc mobiles when i connect usb " Disk drive mount as disk drive " , i need to use my mobile like flash memory to work on my satallite reciver

View 1 Replies View Related

General :: Camera APK Save As PNG Format?

Mar 4, 2012

I'm searching 4 camera apk that cane save the images as png format vs jpeg(bad compression)

i found some thread about jpeg vs png on android and this code line bitmap.compress(Bitmap.CompressFormat.PNG, 100, output);

is there any camera apk with png or can stock camera apk modified to save png?

10nx in ahead

View 2 Replies View Related

HTC Desire :: Save Camera Pics To Sd Card?

May 29, 2010

trying to save camera pics to my sd card but cannot find an option for this can anyone help

View 1 Replies View Related

HTC Incredible :: Allow Camera To Save Pictures Onto SD Card?

Apr 29, 2010

1) Is there a way to allow the camera to save pictures onto the SD card, as mine does not do so?

2) Within the Gmail app, is there a way to move messages from your inbox to other user-created folders? The Motorola Droid definitely had this option, but on the Incredible it looks like it only lets me apply a "Label", which I'm unfamiliar with, though this does not actually move the e-mail to that folder.

View 8 Replies View Related

Android :: How To Save Camera Captured Image?

Jul 6, 2009

I am working with camera.. I am facing one problem during capturing image.The image is not saving directly to gallery.But when i reboot my device its appearing. Can anybody tell me why this happens.and How can i solve it.

View 4 Replies View Related

HTC Desire :: Covers That Save Camera Lens From Scratching

Jul 26, 2010

I'm getting my Desire soon, and I'm worried about protecting the phone properly. Specifically, I've heard that people have problems with the camera lens getting scratched because the phone rests on it if you lay it down on its back. Are there any cheap cases out there that can help solve the resting-on-the-lens problem? A cheap gel case off of ebay would be ideal.Also, what other steps should I take to protect the camera lens?

View 2 Replies View Related

Motorola Milestone :: Get All Camera Pictures To Save To SD Card?

Oct 18, 2010

How can I get all my camera pictures to save to my SD card and not on the phone memory?

View 9 Replies View Related

HTC Incredible :: Save Pictures That I Take With Stock Camera To Sd Card?

Jun 29, 2010

I need to know how to save my pix that I take with the stock camera to the sd card. Also I dl that gallery apk and none of the pix I take with the camera go into it. Any ideas?

View 1 Replies View Related

HTC Droid Eris :: Camera Unable To Save Pictures On SD Card

Oct 8, 2010

the Camera on my Eris will not take pictures due to an error saying it has insufficient file permissions to save pictures to my SD card. I have not unmounted my SD card since this has happened nor did I do it before. I have unmounted it before, but it was never a problem. The camera will not save pictures at all not matter what app is using the camera (Default Android Camera, Facebook, Photoshop Mobile).

View 3 Replies View Related

Motorola Droid :: Camera Doesn't Save The Picture With Rooted 2.2

Jun 26, 2010

So my brother rooted my moto Droid a few days ago and after struggling to get it to work properly with 2.2 we finally got it. However a new problem has emerged I have found out today. When I try to take a picture with the phones camera it doesn't save the picture, it doesn't ask me to save and it sure doesn't do it on its own either.

View 5 Replies View Related

HTC Desire :: Camera App - Save A Copy Of It In The Normal DCIM Folder?

Oct 3, 2010

Im looking for sumthin that would when taking a picture, save a copy of it in the normal DCIM folder, BUT also save a copy in another subdirectory... so essentially ill have 2 of them. the current camera i take a picture, then have to go through my sd card with ES file explorer and copy/paste into the backup directory. ive heard good things about "my backup pro"... but what can i do wit hthis. if i used that app would it .zip folder all my media so i could essentially just take the zip off and put it onto the media hard drive in house.

View 1 Replies View Related

Android : Camera - Internal Listoption / Save Pictures On Sdcard?

Jul 19, 2010

When you are taking a picture on an and device, you can send it. There are apps, which are pushing their actions into these send-list (Like Twidroid, which adds a listitem called "Send Tweet" in that menu).

So, how is it possible to add such a menu point into that menu? For my app, I want to make it possible to take pictures from both (The App itself and via the real camera-send-list) and save them on the sdcard.

View 1 Replies View Related

Android : How To Get Album Art From MediaStore?

Feb 16, 2010

How can I get the album art from MediaStore?

View 1 Replies View Related

Android : Getting ID Of An Image In MediaStore?

Sep 27, 2010

I'm trying to query the Android's MediaStore.Images.Media to get the images contained in the device. I get my cursor on the DB like this: Code...
and I get the indices of the columns this way:

int dataIdx = cursor.getColumnIndex(DATA); ... int idIdx = cursor.getColumnIndex(MediaStore.Images.Media._ID);

unfortunately it seems that the column index idIdx is always -1, which means the column doesn't exist. Am I doing something wrong? Is there anyone else experiencing the same?

View 3 Replies View Related

Android :: Create Mutable Bitmap From Camera - Draw Another Bitmap On Top - And Save It

Apr 2, 2009

I am 1) taking a picture and 2) then draw another Bitmap on top of it 3) then I store it

I am doing it as follows and it works on the emulator.

On the device I get a OutOfMemoryError: bitmap size exceeds VM budget Method) in the line copy the Bitmap to get a mutable Bitmap.


What I am asking:

a) Is there a better way to do what I am doing? 1) take a picture 2) draw another Bitmap on top of it 3) then I store it

b) What is the best way to create a mutable Bitmap from the picture I just took with the camera?

In my app, resolution is not an issue. If it works better for small photos that would be fine.

View 3 Replies View Related

Android : How To Force MediaStore To Rescan SD Card

Feb 14, 2009

If I pragmatically store new media files on the SD card, the MediaStore does not know about them until I remove and reinsert the SD card. Is there a way to tell the MediaStore to rescan the SD card without first unmounting the SD card?

View 6 Replies View Related

Android : Construct MediaStore Uri For Specific Folder

Jun 17, 2010

For example if a have two directories /sdcard/Music/Music-1 and /sdcard/Music/Music-2 how can i construct uri to get the files in Music-1 dir for example. I can use MediaStore.Audio.Media.EXTERNAL_CONTENT_URI to get the content of all external storage but how to do the trick only for specific dir.

View 1 Replies View Related

Android : MediaStore Setting Photo Name To NULL

Aug 13, 2010

I have an app that allows the user to take and save a new picture using the Intent ACTION_IMAGE_CAPTURE. After the user accepts the newly taken picture, I create a ContentValue object to set the picture information, and then I insert the picture into the MediaStore and send a broadcast so that the user can see the photo when opening a picture viewer app such as gallery:

ContentValues newImage = new ContentValues(3);

newImage.put(Media.DISPLAY_NAME, mPicName);
newImage.put(Media.MIME_TYPE, "image/png");
newImage.put(MediaStore.Images.Media.DATA, path);
mPictureUri = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, newImage);
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, mPictureUri));

All of this code works fine. The photo is correctly saved, and I can view the photo using gallery. The problem is that when I view the photo in gallery and select "Details" it shows the photo name as "null." And yes, I know for a fact that the variable mPicName above is not null and always has the correct value.

The odd thing is that, when running my app on my Droid running Android 2.1, when I choose to copy files to/from the phone and my computer, I open up the Droid on my Windows computer, and when I go into my app's created folder for photos and view the new photo, the name is correct. Then, when I disable copying files from the phone/computer and go back into gallery to view the file on my Droid, the name is suddenly correct and is no longer null.

Can someone tell me why the name is null after my code runs, and why the name is correct after viewing the file on my computer rather than on the phone? Is there a way to get the name non-null right when the picture is saved? I'd bet that the name would be correct if I turned my phone off and turned it back on, but I'm not sure how exactly to get force things to work immediately.

View 1 Replies View Related

Android : Get Back Image Taken After Intent MediaStore?

Oct 7, 2010

How do i get back the image taken from starting the Intent(MediaStore.ACTION_IMAGE_CAPTURE)?

I need the image to be display as a thumbnail and also be attached to email.

View 2 Replies View Related

Android :: File Name After MediaStore.Images.Media.insertImage

Apr 17, 2010

I am using MediaStore.Images.Media.insertImage(ContentResolver cr, String imagePath, String name, String description) function to insert a newly created image into gallery. System is naming the file by default, but its different than names of pictures taken by original app(Time stamp). Is there easy way to set it up?

View 2 Replies View Related

Android :: Out Of Memory Calling MediaStore.Images.Media.get Bit ­map

Apr 15, 2010

After I've used a MediaStore.ACTION_IMAGE_CAPTURE intent to take a photo, when I try to retrieve the captured image, I sometimes get an out of memory error as shown below. The odd thing is the huge size of the memory trying to be allocated is always reported as 10,077,696 (x99c600). However, the image file is much smaller, typically around 750,000 bytes.Any suggestions on how to get around this problem? I'm testing this on a Nexus One with firmware version: 2.1-update1 and Build number: ERE27. Code...

View 2 Replies View Related

Android : MediaStore.Extra_Output - Result In A File Containing Picture?

Jul 15, 2009

I have seen a number of posts from people who had trouble retrieving a full size image from MediaStore.EXTRA_OUTPUT with code...

Should this code work? I mean, should this result in a file containing the picture?

View 4 Replies View Related

Android : Mediastore Thumbnails Not Generated Until Gallery App Is Launched?

Sep 30, 2009

Is that normal that Images indexed in the MediaStore do not have thumbnails generated until the Gallery app is launched and the user actively navigates to the bucket where the image is stored ?

I think it's quite odd as I thought thulbnails generation was part of media indexing.

View 9 Replies View Related

Android : Find Orientation Of A Picture Taken With Intent MediaStore?

Feb 17, 2010

When I take a picture with Androids camera app, it detects the phone's orientation and saves the pic accordingly. So if i take a picture of a building, the roof will be on the topside, whether I hold the phone in landscape position or portrait.

However, when i use

Intent imageCaptureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

to get a picture, the camera app doesn't react to orientation. If i hold the phone vertically (portrait), the resulting pic will be rotated, with said building's roof to the left of the screen.

How can I set the intent so that the camera will take orientation into account? Or can I deduce in some way in what orientation the pic was taken and rotate it myself afterward?

View 1 Replies View Related

Android : Way To Look For An Image Using Path - MediaStore.Images.Thumbnails?

Aug 16, 2010

I'm using MediaStore.Images.Thumbnails in order to show the images the user have. But i'm not able to get an image through its path.
Is there any way to look for an image using the path? Code...

View 1 Replies View Related

Android :: Save Images To Amazon S3 From Android Camera?

Oct 31, 2010

I am making and app on android that takes pictures using your camera, I then want to save this image to S3, but I am not sure how to do this.

View 2 Replies View Related

Android : Advice Needed For Manipulating Mediastore For All Music Files?

Aug 3, 2010

I'm rather new to android programming and right now I'm playing with the media store for a personal test project. I've run into a couple double-edge problems..

I need to query the mediastore for a list of all music files, simple enough - but i need to restrict the results to certain folders only. I accomplished this (rather easily) using the SQL-*LIKE- where clauses and all's well on this aspect.
I now need a unique (if this were actually using SQL, I could simply use the DISTINCT modifier and be done with this) list of all artists. Now this is based off the songs in a given path. Therefore I cannot filter the list returned from querying the URI:MediaStore.Audio.Artists.EXTERNAL_CONTENT_URI, and adding in where clauses based off the file path as I did in the first step.

So, what this leaves me with is using my initial query and getting a cursor back then stripping the dupes from the cursor (which is where i am now - too slow, especially with 1000+ songs) - based on a query of artists instead of songs, obviously.

Is is possible to override the actual query that fills the cursor, maybe? As in: override the query and filter how the data is initially put into the cursor (remove recursive entries) and return the proper cursor immediately? Content providers and how they were never built with a distinct function is beyond me, but whatever. Is the returned cursor from a URI query command filled in a manner that can be overridden or not? That's what I'm unclear of at the moment on this. I would like to be able to wrap the getContentResolver().query(xxx..)) command directly to remove the entries on cursor fill, if possible - i do async queries and using a single query statement (well, one for the artist query) would be great.

My other alternative thought is to just preload the data and manipulate my view's data by creating a new cursor based off the preloaded dataset (cursor) - which may be the way to go, and if so - would a cursor be the best way to store this data? Also worried about ram with larger libraries.

Maybe there's simply a way to do a DISTINCT query on the URI - I just do not know. I've seen this question (or the ilk there-of) asked many times with no good answers that were meant for a URI as opposed to a SQL back-end.

View 1 Replies View Related

Android : MediaStore Returning Loop Of Images - Not Entire Directory

Nov 22, 2009

Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. Code...

View 9 Replies View Related

Android : Reading File Of Provider.MediaStore.Im­ages.Media.INTERNAL_CONTENT_UR­I

Mar 2, 2009

I got FileNotFoundException when run this

FileInputStream fileToRead = new FileInputStream(fileName);

here fileName is a string =content://media/external/images/media/6 which is got in sdcard image selection by android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI

any solution?

View 3 Replies View Related

HTC Hero :: Camera Not Working - Message The Application Camera Process Has Stopped Unexpectedly Please Try Again

Dec 6, 2009

My camera stopped working. When I click my camera application I get the message "The application camera (process has stopped unexpectedly. Please try again". It's just a blank screen?

View 3 Replies View Related

HTC Incredible :: Low On Disk Space

Oct 11, 2010

Well, im low on disk space again! The icon keeps coming up every day or every other day! Each time it comes up, I clear data on certain apps, and I uninstall some apps from my phone! I've removed Twitter, Reuters News and Jewels in the last week.. Icon leaves but comes back few days later! And I have a lot of space on my phone by the way!

View 31 Replies View Related

HTC : Mac Not Reading Incredible As Disk

Apr 30, 2010

I've connected my Incredible to my mac via USB. It charges, but I cannot find it as a disk on my mac anywhere. In the phone I have it set to read as a disk. All I am looking to do is transfer some music. Any suggestions?

View 12 Replies View Related

General :: App To Monitor Disk I/O?

May 19, 2013

I have a couple of devices that have gotten laggy over time, and after installing System Monitor, all evidence points to 100% disk I/O usage. Something is reading/writing to memory constantly, pegging it at near 100%... but that's all I can determine.

Is there a app, or technique I can use that would show per-app I/O usage?

View 2 Replies View Related

General :: Motorola Moto G - Save Apps And Games On Cloud To Save Storage?

Apr 19, 2014

I have a Motorola Moto G 8GB which is running very low on storage (only about 800mb left). This phone does not take Micro SD cards but it comes with 50GB Google Drive storage. However i haven't used this at all. I am wondering whether i could download android apps and games to google drive, dropbox etc. Games like Real Racing take up about 1GB so i cannot download it to my phone. Can i download it to the Cloud? If this is not possible, is there any way that i could save the app data on the cloud. E.g. The Simpsons: Tapped Out is about 37mb to download off the play store, but then you must download the updates etc which are about another 250mb. is there anyway to save this 250mb on the cloud. Or any other games data.

View 3 Replies View Related

HTC Incredible :: Mount As Disk Drive

Nov 5, 2010

Unable to connect my DINC to my PC to look around, move some files etc.

Yes, I have USB Debugging checked. Yes, I select "mount as disk drive" when prompted.

Appears to be charging just fine after I attach it to my PC, then I go to open Windows Explorer and Explorer sits and spins then crashes. In fact, when I close Explorer and go to my desktop, all I get is the wallpaper (no desktop icons etc). Then, when I unplug my phone, computer acts normally. Same PC that I used to root my phone mind you, so somehow it was able to connect to my phone for that process.

Have rebooted the phone as well, all to no avail. One of the advantages of Android and the DINC is the ability to hook up to a PC and move files around...not being able to do this is becoming a bit of a PITA...

View 1 Replies View Related

HTC EVO 4G :: Phone Wont Go Into Disk Drive

Sep 29, 2010

So i spent half my night downloading new songs on limewire to add them into my evo.. so i keep putting my phone into disk drive but nothing loads and my computer doesnt reconise the usb port..than theres a little lock next to each of the songs i just downloaded so wtf

View 2 Replies View Related

HTC Hero :: Unable To Access Disk Via USB

Aug 28, 2009

I got my HTC Hero this morning - its my first smartphone and I am very impressed. I saw some fairly damning reviews online, but when I trialled it I was hooked. Superb device A+ so far, except for this little problem which I think is probably linked to my Laptop rather than the Hero... I have plugged it into my Laptop via USB. Vista found the drivers, installed all well and good. However, if I click on Removable Disk (F I get an error stating that there is no disk in the drive and please insert one. I've tried re-installing the drivers using the ones available online, and nothing. I've also installed HTC Sync which simply doesn't find the device despite being plugged in. The Hero reckons it is connected, complete with USB symbol and HTC sync symbol. So what have I done wrong? I've tried all the obvious ones - reinstalling drivers, different USB port, turning both off and on again (many times), uninstalling, reinstalling etc etc....

View 5 Replies View Related

HTC EVO 4G :: USB Sync - Disk Mount Not Working

Nov 7, 2010

When I connect my Evo to my PC, I get no option asking if I want to mount the SD card as a disk drive. I get no notification at all that my phone is plugged into a PC. Do I need to install HTC Sync before I can do this? The manual does not mention it if so. I have tried changing the default setting from "Charge Only" to "disk drive" but no change. The "Ask Me" option is also enabled.

View 8 Replies View Related