目录

Creating an Insight Intent

In DevEco Studio you can create an insight intent to help your app understand user intents and provide services rightly where they are needed.

Constraints

Procedure

  1. Right-click a module or a file in a module and choose New > Insight Intent from the shortcut menu. In the displayed dialog box, set the following fields:

    • Intent domain: domain of the insight intent.
    • Source entry name: name of the entry code file for the insight intent.
    • Intent Settings: additional settings of the insight intent. The following uses MusicDomain as an example:
      • PlayMusic: whether to enable the insight intent for playing a specified song. By default, enabling this option requires a linked UIAbility. In Ability name, specify the ability to link.
      • PlayMusicList: whether to enable the insight intent for playing a specified playlist. By default, enabling this option requires a linked UIAbility. In Ability name, specify the ability to link.

      PlayMusic and PlayMusicList cannot be disabled at the same time.

  2. When you have finished, click Finish. The entry code file is generated under entry > src > main > ets > insightintents. In the insight_intent.json file generated under entry > src > main > resource > base > profile, you can check the configuration of the created insight intent.