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

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -