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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -