android - Xperia Z2 Tablet ACTION_IMAGE_CAPTURE -
android - Xperia Z2 Tablet ACTION_IMAGE_CAPTURE -
i android developer trying our app working on xperia z2 tablet.
our app has functionality allow user take pictures using 'camera' app comes default on android device. functionality works fine, except after take picture, ‘camera’ app not allow user preview image before returning our app. it goes our app after take picture.
we noticed there setting on sony xperia z2 'camera' app set ‘preview’ time either ‘unlimited’, ‘5 seconds’, ‘3 seconds’, ‘edit’, or ‘off’. setting doesn’t seem accessible when ‘camera’ app opened our app.
is there way allow user access preview setting, or @ to the lowest degree programmatically set preview time on ‘camera’ app our app?
below codes using open 'camera' app.
// camera. final list<intent> cameraintents = new arraylist<intent>(); final intent captureintent = new intent(mediastore.action_image_capture); final packagemanager packagemanager = mactivity.getpackagemanager(); final list<resolveinfo> listcam = packagemanager.queryintentactivities(captureintent, 0); for(resolveinfo res : listcam) { final string packagename = res.activityinfo.packagename; final intent intent = new intent(captureintent); intent.setcomponent(new componentname(res.activityinfo.packagename, res.activityinfo.name)); intent.setpackage(packagename); intent.putextra(mediastore.extra_output, uri.fromfile(f)); cameraintents.add(intent); } // filesystem. final intent galleryintent = new intent(); galleryintent.settype("image/*"); galleryintent.setaction(intent.action_get_content); // chooser of filesystem options. final intent chooserintent = intent.createchooser(galleryintent, "select source"); // add together photographic camera options. chooserintent.putextra(intent.extra_initial_intents, cameraintents.toarray(new parcelable[]{})); mactivity.startactivityforresult(chooserintent, photo_request_code);
additional information: app not going available public use. used internally within company. hence have command on tablet app going installed on. sense free reply solutions applies strictly sony xperia tablet.
your help appreciated.
unfortunately preview time setting functionality not available in public api.
one possible solution show preview image within app. should not hard implement.
android android-intent camera sony sony-xperia
Comments
Post a Comment