opt
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
@@ -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 );
|
||||
}
|
||||
Reference in New Issue
Block a user