avd - Android Camera Intent crashes with Nexus 5 Lollipop 5.1 -


i have been running code on other versions of android without problem till got report of crash on nexus lollipop 5.1. when run on nexus 5 api 22 on avd, app crashes camera comes up. code follows:

intent takepictureintent = new      intent(mediastore.action_image_capture);     // ensure there's camera activity handle intent     if (takepictureintent.resolveactivity(getpackagemanager()) != null) {         // create file photo should go         file photofile = null;         try {             photofile = createimagefile();         } catch (ioexception ex) {             // error occurred while creating file             bphotostarted = false;          }         // continue if file created         if (photofile != null) {                  takepictureintent.putextra(mediastore.extra_output,                        uri.fromfile(photofile));             mfulluri = uri.fromfile(photofile);             startactivityforresult(takepictureintent, request_take_photo);         }     } 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -