Commit 3f58b7cb authored by 陈宇雄's avatar 陈宇雄

doc: 优化文档格式

parent 107b6091
......@@ -23,7 +23,7 @@
## 1.1 版本说明
| SDK版本号 | 发布日期 | 更新内容 |
| --------- | ---------- | ---------------------------------------- |
|--------|------------|----------------------|
| 1.0.0 | 2024.07.18 | 1.餐饮识别效果演示版本 |
| 1.0.1 | 2024.08.01 | 1.算法模块集成<br>2.相机模块集成 |
| 1.0.2 | 2024.09.24 | 1.发版版本 |
......@@ -40,10 +40,8 @@
## 1.3 术语定义以及说明
1. 术语说明
+ WmCateringService:元芒餐饮服务
2. 本文中所有传输内容均使用UTF- 8编码;
+ WmCateringService:元芒餐饮服务
2. 本文中所有传输内容均使用UTF-8编码;
3. 本文SDK适用于Android 11及以上,主板要求RK3568(带有NPU模块),使用JAVA 1.8 版本;
4. 本文中的服务程序支持armeabi-v7a、arm64-v8a架构。
......@@ -56,19 +54,17 @@
1. 把WmCateringService_v1.0.2_sdk.jar放在工程libs目录下;
2. module的build.gradle中添加依赖:
```
Implementation files("libs/WmCateringService_v1.0.2_sdk.jar")
```
```
Implementation files("libs/WmCateringService_v1.0.2_sdk.jar")
```
3. AndroidManifest.xml中增加权限:
```
<uses-permissionandroid:name="android.permission.QUERY_ALL_PACKAGES"/>
```
```
<uses-permissionandroid:name="android.permission.QUERY_ALL_PACKAGES"/>
```
4. 若程序开启代码混淆,在防混淆文件中增加:
```
-keep public class com.wmdigit.** {*;}
```
```
-keep public class com.wmdigit.** {*;}
```
## 2.2 接口调用流程描述
1. 推荐在主页Activity的onCreate()中调用bindService接口,绑定本地餐饮服务(需要预装服务程序);
......@@ -95,7 +91,7 @@ public static void bindService(Context context, IOnServiceConListener listener);
- 请求参数
| 请求参数 | 必填 | 类型 | 描述 |
| -------- | ---- | --------------------- | ---------------- |
|----------|----|-----------------------|------------|
| context | 是 | Context | Context上下文 |
| listener | 是 | IOnServiceConListener | 本地服务连接回调 |
......@@ -145,7 +141,7 @@ public void init(IOnInitListener listener);
- 请求参数
| 请求参数 | 必填 | 类型 | 描述 |
| -------- | ---- | --------------------- | ---------------- |
|----------|----|-----------------|-------|
| listener | 是 | IOnInitListener | 初始化回调 |
- 返回说明
......@@ -177,13 +173,13 @@ public void importProducts(List<ProductsDTO> products);
- 请求参数
| 请求参数 | 必填 | 类型 | 描述 |
| -------- | ---- | -------------- |----------|
|----------|----|-------------------|----------|
| products | 是 | List<ProductsDTO> | 商品信息数据数组 |
ProductsDTO
| 参数名 | 必填 | 类型 | 描述 |
| -------- | ---- | -------------- |----------|
|---------------------|----|---------|-----------------|
| productName | 是 | String | 品名 |
| productCode | 是 | String | 商品代码 |
| productMnemonicCode | 是 | String | 商品助记码 |
......@@ -211,13 +207,13 @@ log("商品资料导入完成");
- 函数原型
```java
public void registerDetectionListener(boolean generateBitmap, IOnDetectionListener listener)
public void registerDetectionListener(boolean generateBitmap, IOnDetectionListener listener);
```
- 请求参数
| 请求参数 | 必填 | 类型 | 描述 |
| -------- | ---- | -------------- |----------|
|----------------|----|----------------------|-------------------------------------|
| generateBitmap | 是 | boolean | 是否在识别时生成图片并返回,如无需展示该图片,建议关闭可以提升运算速度 |
| listener | 是 | IOnDetectionListener | 注册识别结果回调 |
- 返回说明
......@@ -234,7 +230,7 @@ WmSdk.getInstance().registerDetectionListener(generateBitmap, detectionListener)
- 函数原型
```java
public void unregisterDetectionListener()
public void unregisterDetectionListener();
```
- 请求参数
......@@ -257,7 +253,7 @@ public DetectResult autoDetect(boolean generateBitmap);
- 请求参数
| 请求参数 | 必填 | 类型 | 描述 |
| --------- | ---- | ------ |----------------|
|----------------|----|---------|-------------------------------------|
| generateBitmap | 是 | boolean | 是否在识别时生成图片并返回,如无需展示该图片,建议关闭可以提升运算速度 |
- 返回说明
......@@ -287,7 +283,7 @@ public boolean checkServiceAppInstalled(Context context);
- 请求参数
| 请求参数 | 必填 | 类型 | 描述 |
| --------- | ---- | ------ |----------------|
|---------|----|---------|------------|
| context | 是 | Context | Context上下文 |
- 返回说明
......@@ -307,7 +303,7 @@ if (WmSdk.getInstance().checkServiceAppInstalled(this)) {
- 函数原型
```java
public boolean checkServiceConnected()
public boolean checkServiceConnected();
```
- 请求参数
- 返回说明
......@@ -414,7 +410,7 @@ WmSdk.getInstance().resetCameraBackground();
# 附录 1 :商品识别返回错误码
| **错误码** | **描述** | **解决方案** |
|---------|---------------------------------|-------------|
|---------|------------|------------|
| 0 | 成功 | |
| 2000 | 摄像头不可用 | 检查摄像头状态 |
| 2001 | 未激活 | 重新注册激活 |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment