The Wayback Machine - https://web.archive.org/web/20200905113850/https://github.com/FinalTeam/RxGalleryFinal/issues/305
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIME type video/mp4 cannot be inserted into content://media/external/images/media; expected MIME type under image/* #305

Open
AFAP opened this issue Apr 11, 2020 · 0 comments

Comments

@AFAP
Copy link

@AFAP AFAP commented Apr 11, 2020

视频拍摄报错:MIME type video/mp4 cannot be inserted into content://media/external/images/media; expected MIME type under image/*

target:28
手机系统Android10
修复:MediaGridFragment.java中
getContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues);这边需要判断,如果是视频要存另一个地方:
Uri uri;
if (image) {
uri = getContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues);
} else {
uri = getContext().getContentResolver().insert(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, contentValues);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.