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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -