diff options
author | Lars Schmertmann <[email protected]> | 2020-05-30 19:45:59 +0200 |
---|---|---|
committer | Lars Schmertmann <[email protected]> | 2021-09-10 06:41:15 +0200 |
commit | f2b914afc6a5ba4aa2f8dcd13a979f04f07034c2 (patch) | |
tree | 287fe6a90f58c4ff4d83eec2f30943b90c96ee1e /src/gui/doc/snippets | |
parent | 5083d9dcd635346363a10c886abee3e99b21d9be (diff) |
Android: Enable QDesktopService
QDesktopServices::openUrl(const QUrl &url) is already implemented
on Android. But even if it is possible to set an URL handler, the
mechanism to invoke it is missing. With this commit the URL handler
will work on Android like it is already working on iOS.
Task-number: QTBUG-84382
Pick-to: 6.2
Change-Id: Ic560bd380f1cc59586861aa1a6a3ea064276a39e
Reviewed-by: Assam Boudjelthia <[email protected]>
Diffstat (limited to 'src/gui/doc/snippets')
-rw-r--r-- | src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp b/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp index 0809d62da97..f1aff54fea1 100644 --- a/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp +++ b/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp @@ -144,7 +144,31 @@ QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + } //! [8] -*/ // comment wrapper 3 +//! [9] +<intent-filter> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.BROWSABLE" /> + <data android:scheme="https" android:host="your.domain.com" android:port="1337" android:path="/help"/> +</intent-filter> +//! [9] + +//! [10] +<intent-filter android:autoVerify="true"> +//! [10] + +//! [11] +[{ + "relation": ["delegate_permission/common.handle_all_urls"], + "target": { + "namespace": "android_app", + "package_name": "com.example.app", + "sha256_cert_fingerprints": + ["14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"] + } +}] +//! [11] +*/ // comment wrapper 3 } // src_gui_util_qdesktopservices |