通過語音命令啟動Developer App

請問如何通過語音啟動APP,
SDK的說明我看不懂。

附圖是我寫的,但是說農業,還是啟動不了APP

以這個為範例
https://github.com/nuwarobotics/NuwaSDKExample/tree/a166f61e42f752eea03ac110fe3b1c4d5ac085c4

0_1632655630266_15abbc43-b87e-479d-a501-65ad6237dfbc-image.png

0_1632655651857_be903063-9553-4920-8ccb-8fbf53dc7a78-image.png

Hi @hang ,
我們NUWA提供的語音觸發有兩條路可以走

  1. activity : 宣告在這裡,nuwa聽到你定義的語音詞,會"開啟" 直接startActivity
  2. receiver : 宣告在這裡,nuwa聽到你定義的語音詞,會"通知" broadcast intent給該receiver

若你需要"開啟"Activity,需要宣告的是Activity內的metadata與action即可

<activity
android:name=".YouAppClass"
android:exported="true"
android:label="App Name"
android:screenOrientation="landscape" >
    <intent-filter>
        <action android:name="com.nuwarobotics.api.action.VOICE_COMMAND" />
    </intent-filter>
    <meta-data android:name="com.nuwarobotics.api.action.VOICE_COMMAND" android:value="你的語音詞" >
</activity>

試試看~~ 😃

Log in to reply

Looks like your connection to NUWA robotics developer forum was lost, please wait while we try to reconnect.