aspose file tools*
The moose likes Android and the fly likes creating jpeg file in internal storage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "creating jpeg file in internal storage" Watch "creating jpeg file in internal storage" New topic

creating jpeg file in internal storage

Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 245

I am writing a code for an android app in which I have to captures image and save it into internal storage of android. For this I have written the following code-

This code creates jpeg file but don't write the image into it.
Later I tried writing following code in onActivityResult-

Astha - OCPJP 6 (90%)
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39570
You can't create File objects on Android:

Edit: Why did you post this question twice? Please don't do that; I've deleted the other copy.

Ping & DNS - updated with new look and Ping home screen widget
I agree. Here's the link:
subject: creating jpeg file in internal storage
Similar Threads
Encoding/decoding problem
listview not clickable
getblob from db, then convert to byte and write to bitmap/jpeg
OutOfMemoryError... Whats the solution?
Get byte[] of image