current_app
Retrieves the package name and page name of the current foreground application on a HarmonyOS device.
Instructions
Get the current foreground application information.
Returns: Tuple[str, str]: A tuple contain the package_name andpage_name of the foreground application. If no foreground application is found, returns (None, None).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |