[android-developers] Re: How to write .jpg/.png file to gallery in Android

2009-06-07 Thread Sujay Krishna Suresh
use the compress method of bitmap like, bitmap.compress(Bitmap.CompressFormat.Ur format, Quality, Outputstream); On Fri, Jun 5, 2009 at 10:25 AM, Pump wrath.of.an...@gmail.com wrote: I've developed an app. taking picture and save on the gallery. The problem is I don't know how to save it to

[android-developers] Re: How to write to the File ?

2009-04-04 Thread Mark Murphy
javame_android wrote: Hi All, I would like to know how to write to file. I have tried using OutPutStream out = new FileOutPutStream(fileName); out.write(byte [], 0, length); This way always returns Parent directory or File is not writable. I have also used openFileOutPut(fileName,

[android-developers] Re: How to write to the File ?

2009-04-04 Thread Evgeny V
Try this: private boolean SaveDataToFile(SomeType data) { ObjectOutputStream objectOut = null; try { File file = new File(sdcard/ + MY_PACKAGE_NAME); if(!file.exists() file.mkdir()) { file = new File(MY_FILE_NAME); if(!file.exists())