diff --git a/README.md b/README.md index 245cd99d56c19139ff89f6e72953353ccc28e0f3..47798e6672e3f199bcf522374572abc1cfb13b35 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 应用间跳转场景实践 +# 基于AppLinking实现应用间跳转 ## 介绍 -本示例介绍了应用间拉起与跳转的方式,包括拉起设置应用,指定应用拉起,指定意图拉起等,拉起应用完成后带参返回。 +本示例基于AppLinking拉端能力,实现了应用间跳转相关功能,包括拉起设置应用,指定应用拉起,指定意图拉起,拉起应用完成后带参返回等,为应用间跳转场景提供了统一可信的拉端体验。 ## 效果预览 手机运行效果图如下: diff --git a/README_EN.md b/README_EN.md new file mode 100644 index 0000000000000000000000000000000000000000..dbea9a070661c8aa46f62d18e72098f001ab9342 --- /dev/null +++ b/README_EN.md @@ -0,0 +1,52 @@ +# Jump Between Applications + +## Overview + +This sample demonstrates how to start and jump between applications. It covers starting an application, starting a specified application, and starting an application with a specified intent. After the application is started, parameters are returned. + +## Preview +The figure shows the effect on a smartphone. + +![image](screenshots/device/phone_EN.gif) + +## Project Directory + +``` +├──entry/src/main/ets // Code +│ ├──pages +│ │ └──Index.ets // Home page +│ ├──entryability +│ │ └──EntryAbility.ets +│ ├──entrybackupability +│ │ └──EntryBackupAbility.ets +│ ├──view +│ │ ├──CommunicationArea.ets // Communication area +│ │ ├──FooterBar.ets // Footer function area +│ │ ├──HeaderBar.ets // Header info area +│ │ ├──MessageItem.ets // Single message +│ │ └──WarningBox.ets // Warning +│ └──viewmodel +│ └──MessageViewModel.ets // Info data +└──entry/src/main/resources // App resource directory +``` + +## How to Implement + +Use **openLink()** to start the app with the specified App Linking. + +Use **startAbilityByType()** to start applications of a specified type and configure the parameters of the applications to be started. The system prompts the user to select an application to continue the operation. After the user selects an application, the operation continues in the application. + +**NOTE**: +1. You need to modify the App Linking in line 67 of `src/main/ets/viewmodel/MessageViewModel.ets`. +2. To start a self-developed app, you need to configure App Linking in the dependence/AppLinkingTestDemo app. It covers applying for a link, certificate, and profile signature. + +## Required Permissions + +N/A + +## Constraints + +1. The sample is supported only on Huawei phones with standard systems. +2. The HarmonyOS version must be HarmonyOS NEXT Beta1 or later. +3. The DevEco Studio version must be DevEco Studio NEXT Beta1 or later. +4. The HarmonyOS SDK version must be HarmonyOS NEXT Beta1 or later. diff --git a/screenshots/device/phone_EN.gif b/screenshots/device/phone_EN.gif new file mode 100644 index 0000000000000000000000000000000000000000..bd1e67cc3da0ea96cbbfb154fced192f51eb8a34 Binary files /dev/null and b/screenshots/device/phone_EN.gif differ