ServiceExtAbility
Introduction
This sample shows how to create and use a Service Extension ability in eTS.
Usage
-
After the demo app is started, touch Start. The ability startup status is displayed.
-
Enter two numbers, which will be passed to the Service Extension ability for the addition operation.
-
Touch Connect to connect to the Service Extension ability. The ability connection status is displayed.
-
After the ability is connected, the numbers entered are sent to the Service Extension ability, which calculates the result and returns the result to the demo app. The app's page displays the calculation result.
-
Touch Disconnect to disconnect from the Service Extension ability. The ability disconnection status is displayed.
Constraints
- This sample can only be run on standard-system devices.
- This sample is based on the stage model, which is supported from API version 9.
- The DevEco Studio version used in this sample must be 3.0 Canary7 or later.