Hi,
I use this line
QDesktopServices::openUrl
(QUrl::fromLocalFile
(model
->getAppPath
()+"classintouch.pdf"));
to open a .pdf file. It works well on a Win client, on Android the
App is being forced to finish.
This behaviour is probably related to
https://bugs.kde.org/show_bug.cgi?id=307605
(For a deeper look I've added the crash log below. Reproducible:
always)
Is there any workaround or alternative idea to open a .pdf from
qt? I somehow have to display my help file...
Best regards,
Sebastian
This is the logcat excerpt:
D/Qtᅵᅵᅵᅵᅵ (22863): #if defined(Q_WS_QPA)
I/ActivityManager(ᅵ 389): START u0 {act=android.intent.action.VIEW
dat=
file:///data/data/org.kde.necessitas.example.classInTouch/files/classintouch.pdf}
from pid 22863
W/dalvikvm(22863): threadid=11: thread exiting with uncaught
exception (group=0x40b04930)
E/AndroidRuntime(22863): FATAL EXCEPTION: Thread-1790
E/AndroidRuntime(22863): android.content.ActivityNotFoundException:
No Activity found to handle Intent { act=android.intent.action.VIEW
dat=
file:///data/data/org.kde.necessitas.example.classInTouch/files/classintouch.pdf
}
E/AndroidRuntime(22863):ᅵᅵᅵᅵᅵᅵᅵ at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1622)
E/AndroidRuntime(22863):ᅵᅵᅵᅵᅵᅵᅵ at
android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
E/AndroidRuntime(22863):ᅵᅵᅵᅵᅵᅵᅵ at
android.app.Activity.startActivityForResult(Activity.java:3370)
E/AndroidRuntime(22863):ᅵᅵᅵᅵᅵᅵᅵ at
android.app.Activity.startActivityForResult(Activity.java:3331)
E/AndroidRuntime(22863):ᅵᅵᅵᅵᅵᅵᅵ at
android.app.Activity.startActivity(Activity.java:3566)
E/AndroidRuntime(22863):ᅵᅵᅵᅵᅵᅵᅵ at
android.app.Activity.startActivity(Activity.java:3534)
E/AndroidRuntime(22863):ᅵᅵᅵᅵᅵᅵᅵ at
org.kde.necessitas.industrius.QtNative.openURL(QtNative.java:87)
E/AndroidRuntime(22863):ᅵᅵᅵᅵᅵᅵᅵ at
dalvik.system.NativeStart.run(Native Method)
W/ActivityManager(ᅵ 389):ᅵᅵ Force finishing activity
org.kde.necessitas.example.classInTouch/org.kde.necessitas.origo.QtActivity
D/mali_winsys(16619): new_window_surface returns 0x3000
I/Qt JAVA (22863): surfaceDestroyed
I/ActivityManager(ᅵ 389): No longer want com.google.android.gms (pid
22465): empty #17