public class DDS
extends java.lang.Object
This program is the property of AI Speech Ltd. It shall be communicated to authorized personnel only. It is not to be disclosed outside the group without prior written consent. If you are not sure if you’re authorized to read this program, please contact info@aispeech.com before reading.
Created by jinrui.gan on 17-3-12.
Modifier and Type | Field and Description |
---|---|
static int |
ERROR_EXTRACT_DDS_BIN
Extract dds.bin error.
|
static int |
ERROR_KERNEL_READY_TIMEOUT
Waiting sys.kernel.ready timeout error.
|
static int |
ERROR_LASA_EXECUTE_FAILED
Lasa execute bootloader error.
|
static int |
ERROR_NO_SPACE_LEFT |
static int |
INIT_COMPLETE_FULL |
static int |
INIT_COMPLETE_NONE |
static int |
INIT_COMPLETE_NOT_FULL |
Modifier and Type | Method and Description |
---|---|
void |
doAuth()
执行设备授权操作
异步返回,见
DDSAuthListener |
Agent |
getAgent()
获取Agent
|
java.lang.String |
getDeviceName()
返回Profile授权方式下的deviceName信息
|
int |
getInitStatus()
获取当前初始化的状态
|
static DDS |
getInstance()
获取DDS实例
|
DDSUpdater |
getUpdater()
获取DDSUpdater
|
java.lang.String |
getVersionName()
获取DDS SDK的版本号
|
void |
init(android.content.Context context,
DDSConfig configs,
DDSInitListener ddsInitListener,
DDSAuthListener ddsAuthListener)
初始化DDS SDK
|
boolean |
isAuthSuccess()
授权是否成功
|
boolean |
isInitComplete()
Deprecated.
|
void |
release()
销毁DDS SDK
|
void |
releaseSync()
同步销毁 DDS SDK
|
void |
setDebugMode(int level)
|
public static final int ERROR_EXTRACT_DDS_BIN
public static final int ERROR_LASA_EXECUTE_FAILED
public static final int ERROR_KERNEL_READY_TIMEOUT
public static final int ERROR_NO_SPACE_LEFT
public static final int INIT_COMPLETE_NONE
public static final int INIT_COMPLETE_NOT_FULL
public static final int INIT_COMPLETE_FULL
public static DDS getInstance()
public java.lang.String getVersionName()
public void init(android.content.Context context, DDSConfig configs, DDSInitListener ddsInitListener, DDSAuthListener ddsAuthListener)
context
- Android context.configs
- 初始化的配置ddsInitListener
- 初始化回调方法ddsAuthListener
- 授权回调方法public void release()
public void releaseSync()
public Agent getAgent()
public DDSUpdater getUpdater() throws DDSNotInitCompleteException
DDSNotInitCompleteException
- 如果DDS没有初始化完成,会抛出exceptionpublic void doAuth() throws DDSNotInitCompleteException
DDSAuthListener
DDSNotInitCompleteException
public java.lang.String getDeviceName() throws DDSNotInitCompleteException
DDSNotInitCompleteException
public boolean isAuthSuccess() throws DDSNotInitCompleteException
DDSNotInitCompleteException
@Deprecated public boolean isInitComplete()
DDS#getInstance()#getInitStatus()
public int getInitStatus()
public void setDebugMode(int level)
init(android.content.Context, com.aispeech.dui.dds.DDSConfig, com.aispeech.dui.dds.DDSInitListener, com.aispeech.dui.dds.DDSAuthListener)
之前调用才生效level
- 可选值1,2,3,4,5 默认值:4