No actions were found to process Intent {act = android.media.action.IMAGE_CAPTURE}

I got the following crash report in my Android app while trying to call the ACTION_IMAGE_CAPTURE intent. This code has been working in my application for several months without any problems. I suppose this is something specific to a particular type of phone, but unfortunately Google does not provide me any additional information beyond the stack trace. Any ideas that this crash report could trigger?

Stack trace

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.media.action.IMAGE_CAPTURE } at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379) at android.app.Activity.startActivityFromChild(Activity.java:3067) at android.app.Activity.startActivityForResult(Activity.java:2847) 

Manufacturer Code

 Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, MY_CAMERA_ACTIVITY_REQUEST_CODE); 

Manifest entries

 <uses-sdk android:minSdkVersion="7" /> <uses-feature android:name="android.hardware.camera" /> 
+4
source share
1 answer

A few things come to mind 1. Maybe a tablet, the Kindle Fire does not have a camera. 2. A phone that does not have a camera 3. An SD card is not installed.

I agree that you believe that it is a safe operation to call the intention of capturing an image, but with so many devices running Android, it is impossible to find out which device your application is running on.

+5
source

Source: https://habr.com/ru/post/1393267/


All Articles