java - Android No Activity found - STILL_IMAGE_CAMERA -
i getting following exception in android app.
no activity found handle intent { act=android.media.action.still_image_camera (has extras) }
i know device, mc70, has camera.
bool hasfeature = packagemanager.hassystemfeature(packagemanager.feature_camera); int numcameras = android.hardware.camera.getnumberofcameras();
both hasfeature true , numcameras > 0
the device has sd card installed:
boolean issdpresent = android.os.environment.getexternalstoragestate().equals(android.os.environment.media_mounted);
in androidmanifest.xml file have:
<uses-feature android:name="android.hardware.camera" android:required="true" /> <uses-permission android:name="android.permission.camera" />
final packagemanager packagemanager = context.getpackagemanager();
this list comes empty, bad sign:
final intent intent = new intent(action); list<resolveinfo> list = packagemanager.queryintentactivities(intent, packagemanager.match_default_only);
this code must run on mc70, limited kitkat 4 api 19.
but when call:
intent takepictureintent = new intent(mediastore.action_image_capture); startactivityforresult(takepictureintent, 1);
i exception:
no activity found handle intent { act=android.media.action.still_image_camera_secure (has extras) }
i have tried:
- mediastore.action_image_capture
- mediastore.action_image_capture_secure
- mediastore.intent_action_still_image_camera
- mediastore.intent_action_still_image_camera_secure
all throw exception. why?
why?
because device manufacturer did not install camera app supports of intent
structures. if device not legitimately ship play store on it, there no requirement manufacturer have meet particular compatibility requirements.
assuming not need camera app particular features, install open source one, open camera, device has app responds action_image_capture
, etc.
Comments
Post a Comment