android 平台跑通中文路径
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.hmwl.face_sdk;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class InitArg {
|
||||
public int action_fps;
|
||||
public float zoom;
|
||||
public Motion motion;
|
||||
public String toJson() {
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("action_fps", action_fps);
|
||||
jsonObject.put("zoom", zoom);
|
||||
jsonObject.put("motion", motion.toJsonObject());
|
||||
return jsonObject.toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.hmwl.face_sdk;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class Motion {
|
||||
public String type;
|
||||
public String technique;
|
||||
public String step;
|
||||
public String show_type;
|
||||
public String png_name;
|
||||
public int png_num;
|
||||
|
||||
public JSONObject toJsonObject() {
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("type", type);
|
||||
jsonObject.put("technique", technique);
|
||||
jsonObject.put("step", step);
|
||||
jsonObject.put("show_type", show_type);
|
||||
jsonObject.put("png_name", png_name);
|
||||
jsonObject.put("png_num", png_num);
|
||||
return jsonObject;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
try {
|
||||
return toJsonObject().toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user