DEV Community

HarmonyOS
HarmonyOS

Posted on

[Smart Watch] [API 6] The smartwatch navigates to the settings interface?

Read the original article:[Smart Watch] [API 6] The smartwatch navigates to the settings interface?

Question: The logic for the smartwatch to navigate to the settings interface.

Short Answer:

Intent intent = new Intent();
Operation operation = new Intent.OperationBuilder()
        .withAction(IntentConstants.ACTION_APPLICATION_DETAILS_SETTINGS)
        .withUri(Uri.getUriFromParts("package","com.huawei.ETSWearable",null))
        .build();

intent.setOperation(operation);
ability.startAbility(intent);
Enter fullscreen mode Exit fullscreen mode

Written by Jeorge Kiryienko

Top comments (0)