I am trying to upload a file using a WebView in Android.
This is the code in use:
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean o
I resolved simply adding the following 2 lines in my PR:
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_MIME_TYPES, fileChooserParams.getAcceptTypes());
Outcome:
2019-04-01 00:18:00.501 32500-32500/my.app.bundle.id D/SystemWebChromeClient: : fileChooserParams.getAcceptTypes(): [.jpg,.png,.tiff,.jpeg,.tif,.pdf]
2019-04-01 00:18:00.503 2225-2921/system_process I/ActivityManager: START u0 {act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=image/* cmp=com.android.documentsui/.picker.PickActivity (has extras)} from uid 10105
I hope it will get accepted.