It is might seem to be easy, but its not. You can use Camera class for that purpose. It will give you back an array of bytes. With the Camera you have to control camera by yourself, but here you need to be careful. Android below 2.0 has not too much available capabilities to control camera. Also you'll get into the out of memory issues and native crashes for sure. I guess, it is because standard camera app is native and can avoid this issues, but in java it is a problem.
Anyway look for Camera class. Regards, Victor aka nakvic. On Oct 26, 8:52 pm, Aaron <[email protected]> wrote: > Just for additional clarification I want to able to take photos and > store them on the sd card and not pollute the users camera folder with > these images. > > On Oct 26, 1:53 pm, Aaron <[email protected]> wrote: > > > > > Hi All, > > > Thanks for all your help on my past questions. I have another one for > > you: > > > How to take a picture using the Camera App and have it NOT appear in > > the Gallery? > > > Here is what I have so far: > > > Time time = new Time(); > > time.setToNow(); > > File dir = new > > File(Environment.getExternalStorageDirectory().toString() + > > BusinessRules.IMAGE_PATH); > > if (!dir.exists()) { > > dir.mkdirs(); > > } > > String fileName = > > time.format("%Y%m%d%H%M%S") + ".jpg"; > > File file = new File(dir, fileName); > > try { > > file.createNewFile(); > > ContentValues values = new > > ContentValues(); > > values.put(Media.TITLE, fileName); > > values.put(Media.MIME_TYPE, > > "image/jpeg"); > > values.put(Media.DATA, > > file.getAbsolutePath()); > > values.put(Media.IS_PRIVATE, 1); > > Uri uri = > > getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, > > values); > > startActivityForResult(new > > Intent(MediaStore.ACTION_IMAGE_CAPTURE).putExtra(MediaStore.EXTRA_OUTPUT, > > uri), 0); > > } catch (IOException e) { > > e.printStackTrace(); > > } > > > I have tried specifying the Media.IS_PRIVATE flag but to no avail. > > > Any help is most appreciated!! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

