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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 41599
You can't create File objects on Android: http://developer.android.com/guide/topics/data/data-storage.html

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

Ping & DNS - my free Android networking tools app
I agree. Here's the link: http://aspose.com/file-tools
subject: creating jpeg file in internal storage