java - How to use this code to save the images inside my android camera app? -


i built own camera launched inside other android app, want save images inside app , not in default gallery, using getexternalfilesdir() because wanna keep data inside app. not working quite right, know have change?? have permission in manifest. phone htc phone

private void dispatchtakepictureintent(int actioncode) {      imageuri = getexternalfilesdir(null) + file.separator             + system.currenttimemillis() + ".jpg";      file mfile = new file(getfilesdir(), "newimage.jpg");     if(!mfile.exists()) {         try{             mfile.createnewfile();         } catch (exception e){             return;         }     }      //uri iuri = uri.parse(imageuri);     log.v("camera", mfile.tostring()); // debugging statement     intent takepictureintent = new intent(mediastore.action_image_capture);     takepictureintent.putextra(mediastore.extra_output, uri.fromfile(mfile));     startactivityforresult(takepictureintent, actioncode);  } 

here code using it.

to hide images gallery should create .nomedia file in folder images, or create own camera app.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

monitor web browser programmatically in Android? -

c# - Using multiple datasets in RDLC -