android - Impossible to take a picture from the app -
i'm using different tab, sames. in app, want take picture camera code
public void takepicture(view v) { imagefilepath = file_path + "/" + "photo_" + idfiche + ".png"; file imagefile = new file(imagefilepath); uri imagefileuri = uri.fromfile(imagefile); intent takepictureintent = new intent(mediastore.action_image_capture); takepictureintent.putextra(mediastore.extra_output, imagefileuri); startactivityforresult(takepictureintent, request_code_picture); } @override protected void onactivityresult(int requestcode, int resultcode, intent data) { inputstream stream = null; if (requestcode == request_code_picture && resultcode == activity.result_ok) { //blablabla } }
it works tab, others, it's impossible click on activation button of photo app save picture, indicated in below picture red border.
i think camera app wrong, if can take picture device directly (not app), how solve it? can delete picture app , use app same code? or launch specific app through new intent???
thank help
i think camera app wrong
most likely. many camera apps seem go through little testing of action_image_capture
.
how solve it?
stop using action_image_capture
. use camera apis directly or through third-party library.
can delete picture app
if "the picture app", mean "the camera app", camera app pre-installed , cannot uninstalled. plus, user may not appreciate attempting uninstall camera app.
and use app same code?
your code give user choice of camera apps, if there more 1 supports action_image_capture
installed on device.
or launch specific app through new intent?
it highly unlikely desired "specific app" exists on device.
Comments
Post a Comment