I want to use ACTION_OPEN_DOCUMENT on my Xiaomi Device. I tried this google sample, but it also not working. With code below i can normally run on Samsung galaxy s4.
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
startActivityForResult(intent, 42);
Im getting "android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE }" error.
Xiaomi screwed up, apparently. AFAIK, they're not Google Play certified, so they do not need to pass the CTS. There is nothing you can really do about it, other than to detect this case (e.g., use PackageManager
and queryIntentActivities()
, or catch the ActivityNotFoundException
) and fall back to whatever you do on pre-Android 4.4 devices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With