This sample calls APIs related to the mission manager to lock, unlock, and clear missions, and switch them to the foreground.
Mission manager: You can lock, unlock, and clear missions, and switch them to the foreground.
ohos.permission.MANAGE_MISSIONS
Pull down the sample app to obtain the mission information, including the bundle name, running status, locking status, mission snapshot, and whether the mission supports migration. Information about a maximum of 10 missions can be obtained.
Swipe left on the mission list and touch Lock to lock a mission.
If the mission is locked, touch Unlock to unlock it.
Touch Delete to delete a mission.
Touch Move to switch a mission to the foreground.
This sample can only be run on standard-system devices.
This sample supports only the SDK of API version 9 and uses the system API @ohos.application.missionManager. Therefore, you must manually switch to the Full SDK for successful compilation. For details about the operation, see Guide to Switching to Full SDK.
DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) must be used.
The permission ohos.permission.MANAGE_MISSIONS is at the system_core level. Therefore, you must manually configure the signature for the corresponding permission level. For details about the permission level, see Permission List. For details about the configuration operation, see Having Your App Automatically Signed.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。