user3076750 user3076750 - 1 year ago 185
Java Question

Android No Activity found - STILL_IMAGE_CAMERA

I am getting the following exception in my android app.

No Activity found to handle Intent { (has extras) }

I know that my device, an MC70, has a camera.

bool hasFeature = packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA);
int numCameras = android.hardware.Camera.getNumberOfCameras();

Both hasFeature is true and numCameras > 0

The device has an SD card installed:

Boolean isSDPresent = android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);

In the AndroidManifest.xml file I have:

<uses-feature android:name="" android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />

final PackageManager packageManager = context.getPackageManager();

This list comes back empty, probably a bad sign:

final Intent intent = new Intent(action);

List<ResolveInfo> list = packageManager.queryIntentActivities(intent,

This code must run on the MC70, which is limited to KitKat 4 API 19.

But when I call:

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(takePictureIntent, 1);

I get the exception:

No Activity found to handle Intent { (has extras) }

I have tried:





All throw the exception. Why?

Answer Source


Because the device manufacturer did not install a camera app that supports any of those Intent structures. If the device does not legitimately ship with the Play Store on it, there is no requirement that the manufacturer have to meet any particular compatibility requirements.

Assuming that you do not need a camera app with any particular features, install an open source one, like Open Camera, so your device has an app that responds to ACTION_IMAGE_CAPTURE, etc.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download