Dies ist unser Code für Video Picker, ziemlich Standard-Code. Dieser Code funktioniert in der Android-Version vor Nougat, löst jedoch eine Ausnahme im Nougat aus.Video Picker - Ausnahme in Nougat
private void pickVideoFromGallery(Activity activity){
Intent intent = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
intent.setType("video/*");
intent.addCategory(Intent.CATEGORY_OPENABLE);
activity.startActivityForResult(intent, MediaPicker.TYPE_FILEVIDEO);
}
Und die Ausnahme ist
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=android.intent.action.PICK cat=[android.intent.category.OPENABLE]
typ=video/* launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } }
Allerdings, wenn ich folgende Zeile auskommentieren, es beginnt zu arbeiten, aber das ist nicht die Lösung, da wir nur geöffnet werden kann, Video
intent.addCategory(Intent.CATEGORY_OPENABLE);
Alle auswählen suchen Idee?
Bitte beenden Sie die Android-Tag auf Ihre Frage Titel hinzufügen. –