Alternative to External Storage Android -
in app, calling camera should capture picture , store on given path:
intent intent = new intent(mediastore.action_image_capture); public static string pic_path =environment.getexternalstoragedirectory().tostring()+name; file file = new file(pic_path); uri outputfileuri = uri.fromfile(file); intent.putextra(mediastore.extra_output, outputfileuri); startactivityforresult(intent, request_camera);
it works fine on devices have sd card or kind of external storage. not work on others (it crashes). so, alternative? how make code work devices without sd card/external storage?
Comments
Post a Comment