Lỗi "content://com.android.providers.media.documents/document" trong android Kitkat


Phiên bản android 4.4.4, chọn file bằng hộp thoại file chooser thì Uri ta nhận được có dạng "content://com.android.providers.media.documents/image%3A". Với Uri này ta sẽ không upload file được trong WebView.
Fix:

  • Dùng thư viện aFileChooser, trong hàm nhận kết quả ta lấy đường dẫn thực sự và thêm tiền tố "File://" vào.

Post a Comment

emo-but-icon

Follow Us

Hot in week

Recent

Comments

Side Ads

Text Widget

Connect Us

item