Details
Description
Using QDesktopServices to open a file in default text editor fails with error:
W/System.err(14268): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=file:///sdcard/tmp/patchfull_14268_temp_2015_08_27_16_22_15_0.log } W/System.err(14268): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1765) W/System.err(14268): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1485) W/System.err(14268): at android.app.Activity.startActivityForResult(Activity.java:3736) W/System.err(14268): at android.app.Activity.startActivityForResult(Activity.java:3697) W/System.err(14268): at android.app.Activity.startActivity(Activity.java:4007) W/System.err(14268): at android.app.Activity.startActivity(Activity.java:3975) W/System.err(14268): at org.qtproject.qt5.android.QtNative.openURL(QtNative.java:110)
I provide projects files with example:
- Compiled on PC, it shows one button to open the created file. It uses QDesktopServices and works
- Compiled on Android, it shows two buttons to open the file. First button use the same code as PC, it fails with error reported above. Second button uses a piece of code I wrote to open the file using QAndroidJniObject, it works.
So, file can be opened, but default Qt implementation in DesktopServices fails!
Attachments
Issue Links
- is replaced by
-
QTBUG-45585 QDesktopServices::openUrl doesn't work on Android
-
- Closed
-
- relates to
-
QTBUG-98974 Android 11 - Scoped Storage
-
- Closed
-
(2 mentioned in)