提交 967e558b 编写于 作者: VK1688's avatar VK1688

update: uts-openSchema

上级 229fe412
## 1.0.1(2024-11-13)
- 修复 Android 打开部分 schema 时没有跳转到目标应用的 Bug
## 1.0.0(2024-04-25)
- 更新 在 Android 和 iOS 上打开链接的 UTS API
{
"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",
......
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册