diff --git a/uni_modules/uts-openSchema/changelog.md b/uni_modules/uts-openSchema/changelog.md index cb0bf4d983531f571f0b9891e8cbb27f8c0320e8..72f03745027942271718c8df9dac40a770999237 100644 --- a/uni_modules/uts-openSchema/changelog.md +++ b/uni_modules/uts-openSchema/changelog.md @@ -1,2 +1,4 @@ +## 1.0.1(2024-11-13) +- 修复 Android 打开部分 schema 时没有跳转到目标应用的 Bug ## 1.0.0(2024-04-25) - 更新 在 Android 和 iOS 上打开链接的 UTS API diff --git a/uni_modules/uts-openSchema/package.json b/uni_modules/uts-openSchema/package.json index 78c3ee379bdcaa76e5ebbec93c2174f26747bd96..532597decd33243df3fb65e4d5a73103ff1930bd 100644 --- a/uni_modules/uts-openSchema/package.json +++ b/uni_modules/uts-openSchema/package.json @@ -1,7 +1,7 @@ { "id": "uts-openSchema", "displayName": "uts-openSchema", - "version": "1.0.0", + "version": "1.0.1", "description": "在 Android 和 iOS 上打开链接的 UTS API", "keywords": [ "uts-openSchema" @@ -45,8 +45,9 @@ "vue3": "y" }, "App": { - "app-android": "y", - "app-ios": "y" + "app-android": "y", + "app-ios": "y", + "app-harmony": "u" }, "H5-mobile": { "Safari": "n", diff --git a/uni_modules/uts-openSchema/utssdk/app-android/index.uts b/uni_modules/uts-openSchema/utssdk/app-android/index.uts index 660c99e26fe30a64a04295a8d8b4f78ca4cd89e6..10d741a3ede8372a064eade220488d96ed4d6ea6 100644 --- a/uni_modules/uts-openSchema/utssdk/app-android/index.uts +++ b/uni_modules/uts-openSchema/utssdk/app-android/index.uts @@ -7,6 +7,7 @@ export const openSchema: OpenSchema = function (url: string) { const context = UTSAndroid.getUniActivity()! const uri = Uri.parse(url) const intent = new Intent(Intent.ACTION_VIEW, uri) + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK) intent.setData(uri) context.startActivity(intent) } else {