Commit 3c4e50e1 by 浦耀宗

第一次提交,加入了所有的文件

parents
# IDEA
*.iml
/.idea
# Built application files
*.apk
*.ap_
# OSX
.DS_Store
# Gradle files
/build
.gradle
/captures
# Local configuration file (sdk path, etc)
/local.properties
gradle
# Files for the Dalvik VM
*.dex
# uartkit
.uartkit
# Java class files
*.class
# Log Files
*.log
#freeline
/projectFilesBackup
/freeline
/freeline_core
freeline.py
freeline_project_description.json
app/version.properties
/app/version.properties
/uartagent/build/
GUIDE_NAME.xml
bank/build/generated/
bank/build/intermediates/bundles/
bank/build/intermediates/incremental/
bank/build/intermediates/lint/
bank/build/intermediates/manifest/
bank/build/intermediates/rs/
bank/build/intermediates/shaders/
cosmodel/build/generated/
cosmodel/build/intermediates/bundles/
cosmodel/build/intermediates/incremental/
cosmodel/build/intermediates/lint/
cosmodel/build/intermediates/manifest/
cosmodel/build/intermediates/rs/
cosmodel/build/intermediates/shaders/
NAVI_NAME.xml
/app/src/main/res/raw/jiudian.mp4
nettytest
/outputs/output.json
/outputs
/blackgaga-out
/java_pid8796.hprof
/faceagent/src/main/java/com/demo/csjbot/faceagent/greendao/gen
\ No newline at end of file
apply plugin: 'com.android.application'
android {
compileOptions.encoding = "UTF-8"
compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.demo.csjbot.csjsdkdemo"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
// 将 jniLib 指向 libs
jniLibs.srcDir 'libs'
}
}
repositories {
flatDir {
dirs 'libs'
}
}
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation(name: 'csjsdk-beta', ext: 'aar')
implementation 'io.netty:netty-all:4.1.23.Final'
implementation 'com.google.code.gson:gson:2.8.1'
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.demo.csjbot.csjsdkdemo;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.demo.csjbot.csjsdkdemo", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.demo.csjbot.csjsdkdemo">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.csjbot.mobileshop.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 获取网络状态 -->
<uses-permission android:name="android.permission.INTERNET" /> <!-- 网络通信 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- 获取设备信息 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 获取MAC地址 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 读写sdcard,storage等等 -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" /> <!-- <uses-feature android:name="android.hardware.camera" /> -->
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.usb.host" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".future.FaceDemoActivity"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".MainActivity" />
<activity
android:name=".future.SlamDemoActivity"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".future.ActionActivity"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".future.InfoAndSensorActivity"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".future.AsrNlpActivity"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.demo.csjbot.csjsdkdemo;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.csjbot.coshandler.core.CsjRobot;
import com.demo.csjbot.csjsdkdemo.future.ActionActivity;
import com.demo.csjbot.csjsdkdemo.future.AsrNlpActivity;
import com.demo.csjbot.csjsdkdemo.future.BaseActivity;
import com.demo.csjbot.csjsdkdemo.future.FaceDemoActivity;
import com.demo.csjbot.csjsdkdemo.future.InfoAndSensorActivity;
import com.demo.csjbot.csjsdkdemo.future.SlamDemoActivity;
public class MainActivity extends BaseActivity {
CsjRobot mCsjBot;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mCsjBot = CsjRobot.getInstance();
}
public void openASrNlpPage(View view) {
startActivity(new Intent(this, AsrNlpActivity.class));
}
public void openSlamDemo(View view) {
startActivity(new Intent(this, SlamDemoActivity.class));
}
public void openFaceDemo(View view) {
startActivity(new Intent(this, FaceDemoActivity.class));
}
public void openAction(View view) {
startActivity(new Intent(this, ActionActivity.class));
}
public void openInfo(View view) {
startActivity(new Intent(this, InfoAndSensorActivity.class));
}
}
package com.demo.csjbot.csjsdkdemo;
import android.app.Application;
import android.util.Log;
import com.csjbot.coshandler.core.CsjRobot;
import com.csjbot.coshandler.listener.OnAuthenticationListener;
import com.csjbot.coshandler.tts.ISpeechSpeak;
import com.csjbot.coshandler.tts.SpeechFactory;
/**
* Created by Administrator on 2019/7/13.
*/
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
CsjRobot.authentication(this, "123", "456", new OnAuthenticationListener() {
@Override
public void success() {
Log.d("TAG", "授权成功!");
}
@Override
public void error() {
Log.d("TAG", "授权失败!");
}
});
try {
Thread.sleep(1500);
} catch (InterruptedException e) {
e.printStackTrace();
}
// 是否启用语音模块(默认开启) #####在init之前调用
CsjRobot.enableAsr(true);
// 是否启用人脸识别模块
CsjRobot.enableFace(true);
// 是否启用导航模块
CsjRobot.enableSlam(true);
// 设置通信的地址,默认是192.168.99.101, 60002
CsjRobot.setIpAndrPort("127.0.0.1", 60002);
/*
* 设置机器人类型(在init之前调用)
* 如果设置了ALICE,则为第八代机器人的协议
*/
CsjRobot.setRobotType(CsjRobot.RobotType.ALICE_NEW);
/*
* 初始化SDK
*/
CsjRobot.getInstance().init(this);
}
}
package com.demo.csjbot.csjsdkdemo;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import com.csjbot.coshandler.core.CsjRobot;
import com.csjbot.coshandler.listener.OnConnectListener;
import com.demo.csjbot.csjsdkdemo.future.BaseActivity;
public class SplashActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (ContextCompat.checkSelfPermission(SplashActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
//没有权限则申请权限
ActivityCompat.requestPermissions(SplashActivity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
}
}
if (CsjRobot.getInstance().getState().isConnect()) {
startActivity(new Intent(SplashActivity.this, MainActivity.class));
} else {
CsjRobot.getInstance().registerConnectListener(new OnConnectListener() {
@Override
public void success() {
startActivity(new Intent(SplashActivity.this, MainActivity.class));
}
@Override
public void faild() {
}
@Override
public void timeout() {
}
@Override
public void disconnect() {
}
});
}
}
private void requestOverlayPermission() {
if (Build.VERSION.SDK_INT >= 23) {
if (!Settings.canDrawOverlays(this)) {
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, 111);
} else {
}
}
}
}
package com.demo.csjbot.csjsdkdemo.entity;
import java.util.List;
public class PersonDetectBean {
/**
* msg_id : FACE_DETECT_FACE_LIST_NTF
* face_num : 1
* face_list : [{"face_detect":{"age":18,"gender":0,"smile":60},"face_recg":{"confidence":18,"name":"tt","person_id":"personid15952353708500-156"}}]
*/
private String msg_id;
private int face_num;
private List<FaceListBean> face_list;
public String getMsg_id() {
return msg_id;
}
public void setMsg_id(String msg_id) {
this.msg_id = msg_id;
}
public int getFace_num() {
return face_num;
}
public void setFace_num(int face_num) {
this.face_num = face_num;
}
public List<FaceListBean> getFace_list() {
return face_list;
}
public void setFace_list(List<FaceListBean> face_list) {
this.face_list = face_list;
}
public static class FaceListBean {
/**
* face_detect : {"age":18,"gender":0,"smile":60}
* face_recg : {"confidence":18,"name":"tt","person_id":"personid15952353708500-156"}
*/
private FaceDetectBean face_detect;
private FaceRecgBean face_recg;
public FaceDetectBean getFace_detect() {
return face_detect;
}
public void setFace_detect(FaceDetectBean face_detect) {
this.face_detect = face_detect;
}
public FaceRecgBean getFace_recg() {
return face_recg;
}
public void setFace_recg(FaceRecgBean face_recg) {
this.face_recg = face_recg;
}
public static class FaceDetectBean {
/**
* age : 18
* gender : 0
* smile : 60
*/
private int age;
private int gender;
private int smile;
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public int getGender() {
return gender;
}
public void setGender(int gender) {
this.gender = gender;
}
public int getSmile() {
return smile;
}
public void setSmile(int smile) {
this.smile = smile;
}
}
public static class FaceRecgBean {
/**
* confidence : 18
* name : tt
* person_id : personid15952353708500-156
*/
private int confidence;
private String name;
private String person_id;
public int getConfidence() {
return confidence;
}
public void setConfidence(int confidence) {
this.confidence = confidence;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPerson_id() {
return person_id;
}
public void setPerson_id(String person_id) {
this.person_id = person_id;
}
}
}
}
package com.demo.csjbot.csjsdkdemo.entity;
import java.util.List;
public class PersonListBean {
/**
* msg_id : FACE_DATABASE_RSP
* data_list : [{"id":"asdw1","name":"李和亮"},{"id":"gfhdf2","name":"齐旭川"}]
* list_num : 2
* all_num : 2
* page_num : 0
*/
private String msg_id;
private int list_num;
private int all_num;
private int page_num;
private List<DataListBean> data_list;
public String getMsg_id() {
return msg_id;
}
public void setMsg_id(String msg_id) {
this.msg_id = msg_id;
}
public int getList_num() {
return list_num;
}
public void setList_num(int list_num) {
this.list_num = list_num;
}
public int getAll_num() {
return all_num;
}
public void setAll_num(int all_num) {
this.all_num = all_num;
}
public int getPage_num() {
return page_num;
}
public void setPage_num(int page_num) {
this.page_num = page_num;
}
public List<DataListBean> getData_list() {
return data_list;
}
public void setData_list(List<DataListBean> data_list) {
this.data_list = data_list;
}
public static class DataListBean {
/**
* id : asdw1
* name : 李和亮
*/
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}
package com.demo.csjbot.csjsdkdemo.entity;
public class RobotPose {
private String poseName;
private PosBean pos;
public PosBean getPos() {
return pos;
}
public void setPos(PosBean pos) {
this.pos = pos;
}
public String getPoseName() {
return poseName;
}
public void setPoseName(String poseName) {
this.poseName = poseName;
}
public static class PosBean {
/**
* x : 2
* y : 1
* z : 0
* rotation : 30
*/
private float x;
private float y;
private float z;
private float rotation;
public float getX() {
return x;
}
public void setX(float x) {
this.x = x;
}
public float getY() {
return y;
}
public void setY(float y) {
this.y = y;
}
public float getZ() {
return z;
}
public void setZ(float z) {
this.z = z;
}
public float getRotation() {
return rotation;
}
public void setRotation(float rotation) {
this.rotation = rotation;
}
@Override
public String toString() {
return "PosBean{" +
"x=" + x +
", y=" + y +
", z=" + z +
", rotation=" + rotation +
'}';
}
}
@Override
public String toString() {
return "RobotPose{" +
"poseName='" + poseName + '\'' +
", pos=" + pos +
'}';
}
}
package com.demo.csjbot.csjsdkdemo.future;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ScrollView;
import android.widget.TextView;
import com.csjbot.coshandler.core.CsjRobot;
import com.csjbot.coshandler.core.Speech;
import com.csjbot.coshandler.core.State;
import com.csjbot.coshandler.core.interfaces.DirectListener;
import com.csjbot.coshandler.listener.OnGoRotationListener;
import com.csjbot.coshandler.listener.OnSpeechListener;
import com.csjbot.coshandler.listener.OnWakeupListener;
import com.csjbot.coshandler.tts.ISpeechSpeak;
import com.csjbot.coshandler.tts.SpeechFactory;
import com.demo.csjbot.csjsdkdemo.R;
import com.demo.csjbot.csjsdkdemo.utils.AutoTestManager;
import com.demo.csjbot.csjsdkdemo.utils.JsonFormatTool;
import org.json.JSONException;
import org.json.JSONObject;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class ActionActivity extends BaseActivity {
private TextView asr_result, nlp_result, wakeup_angle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_action);
initLogShow();
AutoTestManager.getInstance().setOnMsgListener(new AutoTestManager.OnMsgListener() {
@Override
public void msg(String msg) {
runOnUiThread(new Runnable() {
@Override
public void run() {
}
});
}
});
}
@Override
public void onBackPressed() {
this.finish();
}
public void AliceNormal(View view) {
mCsjBot.getExpression().normal();
}
public void AliceHappy(View view) {
mCsjBot.getExpression().happy();
}
public void AliceSad(View view) {
mCsjBot.getExpression().sadness();
}
public void AliceAngry(View view) {
mCsjBot.getExpression().angry();
}
public void AliceCharge(View view) {
mCsjBot.getExpression().lightning();
}
public void AliceSleepy(View view) {
mCsjBot.getExpression().sleepiness();
}
public void aliceReset(View view) {
mCsjBot.getAction().AliceHeadHReset();
}
public void aliceUpHead(View view) {
mCsjBot.getAction().AliceHeadUp();
}
public void aliceDownHead(View view) {
mCsjBot.getAction().AliceHeadDown();
}
public void aliceLeftHead(View view) {
mCsjBot.getAction().AliceHeadLeft();
}
public void aliceRightHead(View view) {
mCsjBot.getAction().AliceHeadRight();
}
public void aliceDownLeft(View view) {
mCsjBot.getAction().AliceLeftArmDown();
}
public void aliceUpLeft(View view) {
mCsjBot.getAction().AliceLeftArmUp();
}
public void aliceUpRight(View view) {
mCsjBot.getAction().AliceRightArmUp();
}
public void aliceDownRight(View view) {
mCsjBot.getAction().AliceRightArmDown();
}
public void aliceAutoTestOpen(View view) {
AutoTestManager.getInstance().start();
}
public void aliceAutoTestClose(View view) {
AutoTestManager.getInstance().stop();
}
}
package com.demo.csjbot.csjsdkdemo.future;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.csjbot.coshandler.core.CsjRobot;
import com.csjbot.coshandler.core.Speech;
import com.csjbot.coshandler.core.State;
import com.csjbot.coshandler.core.interfaces.DirectListener;
import com.csjbot.coshandler.listener.OnGoRotationListener;
import com.csjbot.coshandler.listener.OnSpeechListener;
import com.csjbot.coshandler.listener.OnWakeupListener;
import com.csjbot.coshandler.log.CsjlogProxy;
import com.csjbot.coshandler.tts.ISpeechSpeak;
import com.csjbot.coshandler.tts.SpeechFactory;
import com.demo.csjbot.csjsdkdemo.R;
import com.demo.csjbot.csjsdkdemo.utils.JsonFormatTool;
import org.json.JSONException;
import org.json.JSONObject;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class AsrNlpActivity extends BaseActivity {
private TextView asr_result, nlp_result, wakeup_angle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_asr_nlp);
initLogShow();
asr_result = (TextView) findViewById(R.id.asr_result);
nlp_result = (TextView) findViewById(R.id.nlp_result);
wakeup_angle = (TextView) findViewById(R.id.wakeup_angle);
mCsjBot.registerSpeechListener(onSpeechListener);
mCsjBot.registerWakeupListener(onWakeupListener);
}
private OnSpeechListener onSpeechListener = new OnSpeechListener() {
@Override
public void speechInfo(final String s, final int i) {
runOnUiThread(new Runnable() {
@Override
public void run() {
// 简单解析示例
if (Speech.SPEECH_RECOGNITION_RESULT == i) { // 识别到的信息
try {
String text = new JSONObject(s).getString("text");
asr_result.setText(text);
} catch (JSONException e) {
e.printStackTrace();
}
} else if (Speech.SPEECH_RECOGNITION_AND_ANSWER_RESULT == i) {// 识别到的信息与的回答
try {
String say = new JSONObject(s).getJSONObject("result").getJSONObject("data").getString("say");
nlp_result.setText(say);
speechSpeak.startSpeaking(say, null);
} catch (JSONException e) {
e.printStackTrace();
}
}
}
});
}
};
private OnWakeupListener onWakeupListener = new OnWakeupListener() {
@Override
public void response(final int i) {
runOnUiThread(new Runnable() {
@Override
public void run() {
wakeup_angle.setText(String.format(Locale.getDefault(), getString(R.string.wakeup_angle), i));
speechSpeak.startSpeaking(getString(R.string.im_here), null);
// 声源定位之后转身
mCsjBot.getAction().moveAngle(i, new OnGoRotationListener() {
@Override
public void response(int i) {
if (i > 0 && i < 360) {
if (i <= 180) {
if (mCsjBot.getState().getChargeState() == State.NOT_CHARGING) {
mCsjBot.getAction().moveAngle(i, null);
}
} else {
if (mCsjBot.getState().getChargeState() == State.NOT_CHARGING) {
mCsjBot.getAction().moveAngle(-(360 - i), null);
}
}
}
}
});
}
});
}
};
@Override
public void onBackPressed() {
mCsjBot.unRegisterSpeechListener(onSpeechListener);
mCsjBot.unRegisterWakeupListener(onWakeupListener);
this.finish();
}
public void startAsrService(View view) {
CsjRobot.getInstance().getSpeech().startSpeechService();
}
public void stopAsrService(View view) {
CsjRobot.getInstance().getSpeech().closeSpeechService();
}
public void TurnOnMultipleASR(View view) {
CsjRobot.getInstance().getSpeech().startIsr();
}
public void TurnOffMultipleASR(View view) {
CsjRobot.getInstance().getSpeech().stopIsr();
}
public void textToSpeech(View view) {
String result = nlp_result.getText().toString();
if (TextUtils.isEmpty(result)) {
result = getString(R.string.content_is_null);
}
speechSpeak.startSpeaking(result, null);
}
}
package com.demo.csjbot.csjsdkdemo.future;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Handler;
import android.os.LocaleList;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ScrollView;
import android.widget.TextView;
import com.csjbot.cosclient.utils.CosLogger;
import com.csjbot.coshandler.core.CsjRobot;
import com.csjbot.coshandler.core.interfaces.DirectListener;
import com.csjbot.coshandler.tts.ISpeechSpeak;
import com.csjbot.coshandler.tts.SpeechFactory;
import com.demo.csjbot.csjsdkdemo.R;
import com.demo.csjbot.csjsdkdemo.utils.JsonFormatTool;
import com.demo.csjbot.csjsdkdemo.utils.SystemUtils;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class BaseActivity extends AppCompatActivity {
protected CsjRobot mCsjBot = CsjRobot.getInstance();
protected static ISpeechSpeak speechSpeak;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (speechSpeak == null) {
speechSpeak = SpeechFactory.createSpeech(this, SpeechFactory.SpeechType.GOOGLE);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
// if country != CHINA, set tts to English
Configuration configuration = getResources().getConfiguration();
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
String language = LocaleList.getDefault().get(0).getLanguage();
if (!TextUtils.equals(language, Locale.CHINA.getLanguage())) {
speechSpeak.setLanguage(Locale.ENGLISH);
}
}
}
}, 1000);
}
}
protected void showMsgInTextView(final TextView tv, final String message) {
runOnUiThread(new Runnable() {
@Override
public void run() {
tv.setText(message);
}
});
}
private EditText send_filter, rec_filter;
private Button send_filter_clean, rec_filter_clean;
private ScrollView send_scrollview, rec_scrollview;
private SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
private TextView cmd_send_textview, cmd_rec_textview;
private boolean stopSendShow = false, stopRecShow = false;
protected void initLogShow() {
cmd_send_textview = (TextView) findViewById(R.id.cmd_send_textview);
cmd_rec_textview = (TextView) findViewById(R.id.cmd_rec_textview);
send_scrollview = (ScrollView) findViewById(R.id.send_scrollview);
rec_scrollview = (ScrollView) findViewById(R.id.rec_scrollview);
send_filter = (EditText) findViewById(R.id.send_filter);
rec_filter = (EditText) findViewById(R.id.rec_filter);
send_filter_clean = (Button) findViewById(R.id.send_filter_clean);
rec_filter_clean = (Button) findViewById(R.id.rec_filter_clean);
mCsjBot.setDirectListener(new DirectListener() {
@Override
public void onRecMessage(final String s) {
if (stopRecShow) {
return;
}
runOnUiThread(new Runnable() {
@Override
public void run() {
if (cmd_rec_textview.getText().length() > 100000) {
cmd_rec_textview.setText("");
}
Date date = new Date();
cmd_rec_textview.append("============= " + sdf.format(date) + " =============\r\n");
cmd_rec_textview.append(JsonFormatTool.formatJson(s) + "\r\n");
cmd_rec_textview.append("\r\n");
cmd_rec_textview.append("\r\n");
rec_scrollview.fullScroll(View.FOCUS_DOWN);
}
});
}
@Override
public void onSendMessage(final String s) {
if (stopSendShow) {
return;
}
runOnUiThread(new Runnable() {
@Override
public void run() {
if (cmd_send_textview.getText().length() > 100000) {
cmd_send_textview.setText("");
}
Date date = new Date();
cmd_send_textview.append("============= " + sdf.format(date) + " =============\r\n");
cmd_send_textview.append(JsonFormatTool.formatJson(s) + "\r\n");
cmd_send_textview.append("\r\n");
cmd_send_textview.append("\r\n");
send_scrollview.fullScroll(View.FOCUS_DOWN);
}
});
}
});
send_filter_clean.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
stopSendShow ^= true;
}
});
rec_filter_clean.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
stopRecShow ^= true;
}
});
}
}
package com.demo.csjbot.csjsdkdemo.future;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import com.csjbot.coshandler.listener.OnEmergencyStatusListener;
import com.csjbot.coshandler.listener.OnGetVersionListener;
import com.csjbot.coshandler.listener.OnMotoOverloadListener;
import com.csjbot.coshandler.listener.OnRobotTypeListener;
import com.csjbot.coshandler.listener.OnSNListener;
import com.csjbot.coshandler.listener.OnWarningCheckSelfListener;
import com.demo.csjbot.csjsdkdemo.R;
import org.json.JSONException;
import org.json.JSONObject;
public class InfoAndSensorActivity extends BaseActivity {
private TextView sdkVersion, robotSN, robotType, robotHW, emergency_stop, motor_overload;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_info_sensor);
initLogShow();
sdkVersion = (TextView) findViewById(R.id.sdkVersion);
robotSN = (TextView) findViewById(R.id.robotSN);
robotType = (TextView) findViewById(R.id.robotType);
robotHW = (TextView) findViewById(R.id.robotHW);
emergency_stop = (TextView) findViewById(R.id.emergency_stop);
motor_overload = (TextView) findViewById(R.id.motor_overload);
mCsjBot.getState().getSN(onSNListener);
mCsjBot.getState().getRobotType(onRobotTypeListener);
mCsjBot.getState().getEmergencyStatus(onEmergencyStatusListener);
mCsjBot.getState().getMotoOverloadState(onMotoOverloadListener);
mCsjBot.getState().checkSelf(onWarningCheckSelfListener);
mCsjBot.getVersion().getVersion(onVersionListener);
}
@Override
public void onBackPressed() {
this.finish();
}
private OnEmergencyStatusListener onEmergencyStatusListener = new OnEmergencyStatusListener() {
@Override
public void response(int i) {
String stop = i == 0 ? getString(R.string.emergency_pressed) : getString(R.string.emergency_released);
showMsgInTextView(emergency_stop, stop);
}
};
private OnMotoOverloadListener onMotoOverloadListener = new OnMotoOverloadListener() {
@Override
public void response(int i) {
String overload = i == 0 ? getString(R.string.not_overload) : getString(R.string.overload);
showMsgInTextView(motor_overload, overload);
}
};
private OnRobotTypeListener onRobotTypeListener = new OnRobotTypeListener() {
@Override
public void robotType(String s) {
showMsgInTextView(robotType, s);
}
};
private OnWarningCheckSelfListener onWarningCheckSelfListener = new OnWarningCheckSelfListener() {
@Override
public void response(String s) {
showMsgInTextView(robotHW, s);
}
};
private OnSNListener onSNListener = new OnSNListener() {
@Override
public void response(String s) {
try {
JSONObject root = new JSONObject(s);
showMsgInTextView(robotSN, root.optString("sn"));
} catch (JSONException e) {
e.printStackTrace();
}
}
};
private OnGetVersionListener onVersionListener = new OnGetVersionListener() {
@Override
public void response(String s) {
showMsgInTextView(sdkVersion, s);
}
};
public void getSDKVersion(View view) {
mCsjBot.getVersion().getVersion(onVersionListener);
}
public void getSN(View view) {
mCsjBot.getState().getSN(onSNListener);
}
public void getRobotType(View view) {
mCsjBot.getState().getRobotType(onRobotTypeListener);
}
public void emergencyStop(View view) {
mCsjBot.getState().getEmergencyStatus(onEmergencyStatusListener);
}
public void motorOverload(View view) {
mCsjBot.getState().getMotoOverloadState(onMotoOverloadListener);
}
public void getRobotHW(View view) {
mCsjBot.getState().checkSelf(onWarningCheckSelfListener);
}
}
package com.demo.csjbot.csjsdkdemo.utils;
import com.csjbot.coshandler.core.CsjRobot;
/**
* Created by Administrator on 2019/5/23.
*/
public class AutoTestManager {
private volatile static AutoTestManager autuTestManager;
private volatile static boolean isStart;
private CsjRobot mCsjBot = CsjRobot.getInstance();
public static AutoTestManager getInstance() {
if (autuTestManager == null) {
synchronized (AutoTestManager.class) {
if (autuTestManager == null) {
autuTestManager = new AutoTestManager();
}
}
}
return autuTestManager;
}
public void start() {
isStart = true;
}
public void stop() {
isStart = false;
}
private AutoTestManager() {
new Thread(new Runnable() {
@Override
public void run() {
while (true) {
try {
Thread.sleep(200);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (!isStart) {
continue;
}
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
// CosLogger.info("头部左转");
if (onMsgListener != null) {
onMsgListener.msg("头部左转");
}
mCsjBot.getAction().actionNew(2, 1, 100, 3);
mCsjBot.getAction().actionNew(3, 2, 50, 3);
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (onMsgListener != null) {
onMsgListener.msg("头部低头");
}
mCsjBot.getAction().actionNew(1, 1, 30, 3);
mCsjBot.getAction().actionNew(2, 2, 45, 3);
mCsjBot.getAction().actionNew(3, 1, 50, 3);
mCsjBot.getAction().actionNew(4, 1, 50, 3);
try {
Thread.sleep(1200);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (onMsgListener != null) {
onMsgListener.msg("右转");
}
mCsjBot.getAction().actionNew(1, 2, 30, 3);
mCsjBot.getAction().actionNew(2, 2, 45, 3);
try {
Thread.sleep(200);
} catch (InterruptedException e) {
e.printStackTrace();
}
mCsjBot.getAction().actionNew(4, 2, 50, 3);
}
}
}).start();
}
public volatile OnMsgListener onMsgListener;
public void setOnMsgListener(OnMsgListener listener) {
onMsgListener = listener;
}
public interface OnMsgListener {
void msg(String msg);
}
}
package com.demo.csjbot.csjsdkdemo.utils;
public class JsonFormatTool {
/**
* 单位缩进字符串。
*/
private static String SPACE = " ";
/**
* 返回格式化JSON字符串。
*
* @param json 未格式化的JSON字符串。
* @return 格式化的JSON字符串。
*/
public static String formatJson(String json) {
StringBuilder result = new StringBuilder();
int length = json.length();
int number = 0;
char key = 0;
//遍历输入字符串。
for (int i = 0; i < length; i++) {
//1、获取当前字符。
key = json.charAt(i);
//2、如果当前字符是前方括号、前花括号做如下处理:
if ((key == '[') || (key == '{')) {
//(1)如果前面还有字符,并且字符为“:”,打印:换行和缩进字符字符串。
if ((i - 1 > 0) && (json.charAt(i - 1) == ':')) {
result.append('\n');
result.append(indent(number));
}
//(2)打印:当前字符。
result.append(key);
//(3)前方括号、前花括号,的后面必须换行。打印:换行。
result.append('\n');
//(4)每出现一次前方括号、前花括号;缩进次数增加一次。打印:新行缩进。
number++;
result.append(indent(number));
//(5)进行下一次循环。
continue;
}
//3、如果当前字符是后方括号、后花括号做如下处理:
if ((key == ']') || (key == '}')) {
//(1)后方括号、后花括号,的前面必须换行。打印:换行。
result.append('\n');
//(2)每出现一次后方括号、后花括号;缩进次数减少一次。打印:缩进。
number--;
result.append(indent(number));
//(3)打印:当前字符。
result.append(key);
//(4)如果当前字符后面还有字符,并且字符不为“,”,打印:换行。
if (((i + 1) < length) && (json.charAt(i + 1) != ',')) {
result.append('\n');
}
//(5)继续下一次循环。
continue;
}
//4、如果当前字符是逗号。逗号后面换行,并缩进,不改变缩进次数。
if ((key == ',')) {
result.append(key);
result.append('\n');
result.append(indent(number));
continue;
}
//5、打印:当前字符。
result.append(key);
}
return result.toString();
}
/**
* 返回指定次数的缩进字符串。每一次缩进三个空格,即SPACE。
*
* @param number 缩进次数。
* @return 指定缩进次数的字符串。
*/
private static String indent(int number) {
StringBuffer result = new StringBuffer();
for (int i = 0; i < number; i++) {
result.append(SPACE);
}
return result.toString();
}
}
package com.demo.csjbot.csjsdkdemo.utils;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.os.LocaleList;
import android.util.DisplayMetrics;
import java.util.Locale;
public class SystemUtils {
/**
* 获取当前系统语言
*
* @return 当前系统语言
*/
public static String getSystemLanguage() {
Locale locale;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
locale = LocaleList.getDefault().get(0);
} else {
locale = Locale.getDefault();
}
return locale.getLanguage();
}
/**
* 设置 App 语言
*
* @param context
* @param language
*/
public static void setLanguage(Context context, String language) {
Resources resources = context.getResources();
Configuration configuration = resources.getConfiguration();
DisplayMetrics displayMetrics = resources.getDisplayMetrics();
switch (language) {
case "en":
configuration.locale = Locale.ENGLISH;
break;
default:
configuration.locale = Locale.CHINESE;
break;
}
resources.updateConfiguration(configuration, displayMetrics);
}
/**
* 重启App
*
* @param context
*/
public static void resetApp(Context context) {
Intent intent = context.getPackageManager()
.getLaunchIntentForPackage(context.getPackageName());
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
context.startActivity(intent);
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="@string/demo"
android:textSize="25sp" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="openASrNlpPage"
android:text="@string/asr_nlp"
android:textAllCaps="false" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="openSlamDemo"
android:text="@string/Slam"
android:textAllCaps="false" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="openFaceDemo"
android:text="@string/face_demo"
android:textAllCaps="false" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="openAction"
android:text="@string/action_demo"
android:textAllCaps="false" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="openInfo"
android:text="@string/info_sensor"
android:textAllCaps="false" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.demo.csjbot.csjsdkdemo.MainActivity">
<Button
android:id="@+id/bt_alice_arm_right_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Alice右臂抬起"
/>
<Button
android:id="@+id/bt_alice_arm_right_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Alice右臂放下"
/>
<Button
android:id="@+id/bt_happy_expression"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="开心表情"
/>
<Button
android:id="@+id/bt_save_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="保存机器人当前地图(一般使用思岚软件扫完或编辑完地图之后保存一次即可)"
/>
<Button
android:id="@+id/bt_save_point1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="保存当前位置信息(位置1)"
/>
<Button
android:id="@+id/bt_save_point2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="保存当前位置信息(位置2)"
/>
<Button
android:id="@+id/bt_navi_point1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="导航到位置1"
/>
<Button
android:id="@+id/bt_navi_point2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="导航到位置2"
/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.demo.csjbot.csjsdkdemo.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/conncet_to_sdk"
android:textColor="@color/colorAccent"
android:textSize="68sp" />
</RelativeLayout>
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:id="@+id/person_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<resources>
<string name="Slam">导航和行走</string>
<string name="action_demo">动作和表情</string>
<string name="alice_action">Alice 动作</string>
<string name="alice_angry">Alice 愤怒</string>
<string name="alice_expression">Alice 表情</string>
<string name="alice_happy">Alice 高兴</string>
<string name="alice_lighting">Alice 闪电</string>
<string name="alice_normal">Alice 普通</string>
<string name="alice_sad">Alice 悲伤</string>
<string name="alice_sleepy">Alice 困倦</string>
<string name="app_name">穿山甲SDKDemo</string>
<string name="asr_nlp">语音识别和语义理解</string>
<string name="auto_test_off">自动测试(关)</string>
<string name="auto_test_on">自动测试(开)</string>
<string name="cancel_register">取消注册</string>
<string name="close_preview">关闭预览</string>
<string name="content_is_null">内容为空</string>
<string name="delete_chosen_face">删除选中</string>
<string name="demo">穿山甲机器人 DEMO</string>
<string name="do_not_register_again">您已经注册过了,请勿重复注册</string>
<string name="emergency_pressed">急停被按下</string>
<string name="emergency_released">急停松开</string>
<string name="face_demo">人脸识别和注册</string>
<string name="face_register">注册</string>
<string name="get_all_person">获取所有注册过的人</string>
<string name="get_pose">获取到坐标 </string>
<string name="get_pose_ok">坐标获取成功</string>
<string name="have_no_person">无人</string>
<string name="have_person">有人</string>
<string name="head_down">低头</string>
<string name="head_left">头部左转</string>
<string name="head_right">头部右转</string>
<string name="head_up">抬头</string>
<string name="hello">您好,</string>
<string name="im_here">我在呢!</string>
<string name="in_charge">在充电中</string>
<string name="info_sensor">机器人信息和传感器</string>
<string name="keep_smail">请保持微笑,注视相机,开始倒计时,</string>
<string name="left_arm_down">左放</string>
<string name="left_arm_up">左抬</string>
<string name="map_not_restored">地图没有恢复</string>
<string name="map_restore_result">地图恢复结果:</string>
<string name="map_restored">地图已经恢复</string>
<string name="move_speed">行走速度是 </string>
<string name="navi_arrived">已经到啦!</string>
<string name="navi_cancel">任务取消</string>
<string name="navi_msg_send_ok">导航消息下发成功,正在前往</string>
<string name="not_charge">不在充电中</string>
<string name="not_overload">电机没有过载</string>
<string name="open_preview">打开预览</string>
<string name="overload">电机过载</string>
<string name="person_chosen">person 选中:</string>
<string name="person_status">person 状态:</string>
<string name="please_enter_name">请输入用户名</string>
<string name="please_retry">好像未检测到人脸,请重新尝试</string>
<string name="please_try_later">我正在导航中,请稍后再试</string>
<string name="pose1">位置1</string>
<string name="pose2">位置2</string>
<string name="rec_show">接收显示</string>
<string name="register_ok">注册成功</string>
<string name="reset">复位</string>
<string name="right_arm_down">右放</string>
<string name="right_arm_up">右抬</string>
<string name="send_show">发送显示</string>
<string name="take_picture">拍照</string>
<string name="wakeup_angle">拾音角度 %1$d 度</string>
<string name="power">实时电量:</string>
<string name="charge_state">充电状态:</string>
<string name="save_map">保存地图</string>
<string name="load_map">恢复地图</string>
<string name="query_load_state">查询地图状态</string>
<string name="turn_right_60">向右转60度</string>
<string name="turn_left_60">向左转60度</string>
<string name="turn_right_to_60">转至60度(相对于开机位置)</string>
<string name="navi_state">导航状态:</string>
<string name="get_pose_1">获取并保存位置1</string>
<string name="navi_to_pose_1">导航到位置1</string>
<string name="get_pose_2">获取并保存位置2</string>
<string name="navi_to_pose_2">导航到位置2</string>
<string name="cancel_navi">取消导航</string>
<string name="go_home_charge">回去充电</string>
<string name="get_navi_speed">获取导航速度</string>
<string name="set_navi_speed_05">设置速度为0.5 米/秒</string>
<string name="set_navi_speed_07">设置速度为0.7 米/秒</string>
<string name="open_asr_service">开启语音服务</string>
<string name="close_asr_service">关闭语音服务</string>
<string name="open_muti_asr">开启多次语音识别</string>
<string name="close_muti_asr">关闭多次语音识别</string>
<string name="wake_up_angle">唤醒角度(唤醒词:灵犀灵犀):</string>
<string name="asr_result">ASR结果:</string>
<string name="nlp_result">NLP结果:</string>
<string name="text_to_speech">TTS播报</string>
<string name="sdk_version">SDK版本号:</string>
<string name="robot_sn">机器人SN:</string>
<string name="robot_type">机器人类型:</string>
<string name="robot_hw_info">机器人硬件信息:</string>
<string name="get_robot_hw_info">获取硬件信息</string>
<string name="emergency_stop_state">获取急停状态:</string>
<string name="get_emergency_stop_state">获取急停状态</string>
<string name="moto_overload_state">电机过载查询:</string>
<string name="get_moto_overload_state">电机过载查询</string>
<string name="get_robot_type">获取机器人类型</string>
<string name="get_robot_sn">获取机器人SN</string>
<string name="conncet_to_sdk">正在连接机器人...</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>
<resources>
<dimen name="fab_margin">16dp</dimen>
</resources>
<resources>
<string name="Slam">Navigation and Moving</string>
<string name="action_demo">Action and Expression</string>
<string name="alice_action">Alice action</string>
<string name="alice_angry">Alice is angry</string>
<string name="alice_expression">Alice\'s expression</string>
<string name="alice_happy">Alice is happy</string>
<string name="alice_lighting">Alice lightning</string>
<string name="alice_normal">Alice ordinary</string>
<string name="alice_sad">Alice is sad</string>
<string name="alice_sleepy">Alice sleepy</string>
<string name="app_name">Csjbot SDKDemo</string>
<string name="asr_nlp">ASR and NLP</string>
<string name="auto_test_off">Auto test (off)</string>
<string name="auto_test_on">Auto test (on)</string>
<string name="cancel_register">Cancel register</string>
<string name="close_preview">Close preview</string>
<string name="content_is_null">Content is empty</string>
<string name="delete_chosen_face">Delete selected</string>
<string name="demo">Csj Robot Demo</string>
<string name="do_not_register_again">You have already registered. Please do not register again</string>
<string name="emergency_pressed">Emergency stop pressed</string>
<string name="emergency_released">Emergency stop release</string>
<string name="face_demo">Face Recognition and Registration</string>
<string name="face_register">register</string>
<string name="get_all_person">Get all registered people</string>
<string name="get_pose">Get coordinates</string>
<string name="get_pose_ok">Coordinates obtained successfully</string>
<string name="have_no_person">There are no people</string>
<string name="have_person">There are people</string>
<string name="head_down">Bow Alice head</string>
<string name="head_left">Head left turn</string>
<string name="head_right">Head right turn</string>
<string name="head_up">Rise Alice head</string>
<string name="hello">Hello!</string>
<string name="im_here">I\'m here!</string>
<string name="in_charge">Charging</string>
<string name="info_sensor">Robot info and Sensors</string>
<string name="keep_smail">Please keep smiling, look at the camera and start the countdown,</string>
<string name="left_arm_down">left arm down</string>
<string name="left_arm_up">left arm up</string>
<string name="map_not_restored">The map was not loaded</string>
<string name="map_restore_result">Map load results:</string>
<string name="map_restored">The map has been loaded</string>
<string name="move_speed">The navi speed is</string>
<string name="navi_arrived">It\'s here!</string>
<string name="navi_cancel">Task canceled</string>
<string name="navi_msg_send_ok">The navigation message has been sent successfully. I am going to</string>
<string name="not_charge">Not charging</string>
<string name="not_overload">The motor is not overloaded</string>
<string name="open_preview">Open Preview</string>
<string name="overload">motor overload </string>
<string name="person_chosen">Person:</string>
<string name="person_status">Person state:</string>
<string name="please_enter_name">Please enter name</string>
<string name="please_retry">It seems that no face has been detected. Please try again</string>
<string name="please_try_later">I\'m navigating. Please try again later</string>
<string name="pose1">Position 1</string>
<string name="pose2">Position 2</string>
<string name="rec_show">Receive display</string>
<string name="register_ok">register successfully</string>
<string name="reset">Reset head</string>
<string name="right_arm_down">Put it right</string>
<string name="right_arm_up">Right lift</string>
<string name="send_show">Send display</string>
<string name="take_picture">Take Picture</string>
<string name="wakeup_angle">Wakeup angle %1$d degrees</string>
<string name="power">Real time power:</string>
<string name="charge_state">Charging state : </string>
<string name="save_map">Save map</string>
<string name="load_map">Load map</string>
<string name="query_load_state">Query map state</string>
<string name="turn_right_60">Turn right 60 degrees</string>
<string name="turn_left_60">Turn left 60 degrees</string>
<string name="turn_right_to_60">Turn to 60 degrees (relative to power on position)</string>
<string name="navi_state">Navigation state:</string>
<string name="get_pose_1">Get and save location 1</string>
<string name="navi_to_pose_1">Navigate to location 1</string>
<string name="get_pose_2">Get and save location 2</string>
<string name="navi_to_pose_2">Navigate to location 2</string>
<string name="cancel_navi">Cancel navigation</string>
<string name="go_home_charge">Go back and recharge</string>
<string name="get_navi_speed">Get navigation speed</string>
<string name="set_navi_speed_05">Set speed to 0.5m/s</string>
<string name="set_navi_speed_07">Set speed to 0.7m/s</string>
<string name="open_asr_service">Turn on voice service</string>
<string name="close_asr_service">Turn off voice service</string>
<string name="open_muti_asr">Turn on multiple speech recognition</string>
<string name="close_muti_asr">Turn off multiple speech recognition</string>
<string name="wake_up_angle">wakeup angle (arousal word: Lingxi Lingxi) : </string>
<string name="asr_result">ASR results : </string>
<string name="nlp_result">The NLP : </string>
<string name="text_to_speech">Text To Speech</string>
<string name="sdk_version">SDK version number : </string>
<string name="robot_sn">Robot SN : </string>
<string name="robot_type">Robot type : </string>
<string name="robot_hw_info">Robot hardware info : </string>
<string name="get_robot_hw_info">Get hardware info</string>
<string name="emergency_stop_state">Get emergency-stop state : </string>
<string name="get_emergency_stop_state">Get emergency-stop state</string>
<string name="moto_overload_state">Motor overload query : </string>
<string name="get_moto_overload_state">Motor overload state : </string>
<string name="get_robot_type">Get robot type</string>
<string name="get_robot_sn">Get robot SN</string>
<string name="conncet_to_sdk">Connecting to the Robot</string>
</resources>
<resources> <style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /></resources>
\ No newline at end of file
package com.demo.csjbot.csjsdkdemo;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.enableJetifier=false
android.useAndroidX=false
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
## 什么是RobotSDKForYingbin Android
RobotSDKForYingbin 是Android平台上基于机器人硬件的软件开发包,帮助开发者快速接入机器人各项功能,以实现控制迎宾机器人的功能。
## 有哪些功能
SDK提供了语音识别、语义理解、人脸识别、人脸注册、导航控制、动作控制、表情控制以及传感器等功能,更详细请参考
## 版本说明
版本更新和说明详见
## 接入教程
1. 下载并且安装tools文件夹下面的[face-release.apk]((http://gitlab.csjbot.com/open/RobotSDKForYingbin-Android-Sample-app/raw/master/release-app/face-release.apk)[face-release.apk](http://gitlab.csjbot.com/open/RobotSDKForYingbin-Android-Sample-app/raw/master/release-app/face-release.apk)应用,这两个应用是能力提供
2. 安装完成之后,启动一下,会有界面要求授权“可出现在其他应用上的应用”,给予权限
3. 可以直接安装 SDK-Demo.apk,可以查看各项能力
## 开始接入
1. 参考 SDK接入说明 可在Android平台上接入SDK
2. 各接口及参数、常量、枚举的定义,在 穿山甲机器人AI手册_Android发行版.docx 下面可以查看
3. Android_SAMPLE 中有完整的接入示例,可供您参考
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论