3.7 How to keep Sanbot quiet?
3.7.1 Use “doSleep” API to letSanbotstart sleeping, so it will not response to any voice command.
Example code for reference :
finalSpeechManagerspeechManager= (SpeechManager)getUnitManager(FuncConstant.SPEECH_MANAGER);
Buttonbutton_sleep= (Button)findViewById(R.id.button_sleep);
button_sleep.setOnClickListener(newView.OnClickListener() {
@Override
public voidonClick(View view) {
speechManager.doSleep();
}
});
3.7.2 Add method “<meta-dataandroid:name=“FORBID_WAKE_RESPONSE”android:value=“true”/>”to your android project
AndriodManifest.xml . If you add this code, it will disable default wake up function.
3.7.3 Add method “<meta-dataandroid:name="RECOGNIZE_MODE"android:value="1"/>to your project AndroidManifest.xml.
If you add this code, it will disable all system default voice commands.
3.7.4 Disable default touch events.
Method <meta-dataandroid:name=“FORBID_TOUCH”android:value=“true”/>
3.7.5 Disable default PIR response
Method <meta-data android:name=“FORBID_PIR”android:value=“true”/>