This commit is contained in:
wangcongtao
2020-01-09 14:59:46 +08:00
parent 742b72d9e4
commit c48af40b32
29 changed files with 858 additions and 121 deletions

View File

@@ -71,7 +71,10 @@ public class MogoServicePaths {
*/
public static final String PATH_FRAGMENT_MANAGER = "/fragmentmanager/api";
/**
* 免唤醒语音控制
*/
public static final String PATH_VOICE_MANAGER = "/voicemanager/api";
}

View File

@@ -0,0 +1,20 @@
package com.mogo.service.voice;
import android.content.Intent;
/**
* @author congtaowang
* @since 2020-01-09
* <p>
* 免唤醒语音监听
*/
public interface IMogoVoiceListener {
/**
* 回调语音意图
*
* @param action 广播 action
* @param intent 意图
*/
void onIntentReceived( String action, Intent intent );
}

View File

@@ -0,0 +1,36 @@
package com.mogo.service.voice;
import android.content.Intent;
import com.alibaba.android.arouter.facade.template.IProvider;
/**
* @author congtaowang
* @since 2020-01-09
* <p>
* 免唤醒语音控制
*/
public interface IMogoVoiceManager extends IProvider {
/**
* 注册意图接收者
*
* @param action
*/
void registerIntentListener( String action, IMogoVoiceListener listener );
/**
* 注册意图接收者
*
* @param action
*/
void unregisterIntentListener( String action );
/**
* 触发意图回调,各业务不用关心
*
* @param action
* @param intent
*/
void invoke( String action, Intent intent );
}