0
이것은 동영상 및 이미지 용 피커를 여는 코드입니다.하지만 길이가 5 분을 초과하는 동영상은 표시하지 않아야합니다. 이것이 가능한가?Android : 오픈 픽처 픽커 및 필터 동영상 길이 :
public void startChoosePhotoFromLibrary() {
if (checkOrRequestExternalStoreagePermission()) {
if (Build.VERSION.SDK_INT < 19) {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/* video/*");
startActivityForResult(photoPickerIntent, PICK_PHOTO_ACTIVITY_REQUEST_CODE);
} else {
Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
photoPickerIntent.setType("*/*");
photoPickerIntent.putExtra(Intent.EXTRA_MIME_TYPES, new String[]{"image/*", "video/*"});
startActivityForResult(photoPickerIntent, PICK_PHOTO_ACTIVITY_REQUEST_CODE);
}
}
}
감사합니다. 나는 이것이 유일한 옵션이라고 생각했습니다. –