|
|
|
@@ -157,9 +157,17 @@ public class ArcSoftFaceCheckManager implements FaceCheckInterface { |
|
|
|
if (code != 200) { |
|
|
|
onFail(obj.getString("msg")); |
|
|
|
} else { |
|
|
|
String activeKey = obj.optString("activation_code"); |
|
|
|
activeArc(activeKey, false); |
|
|
|
ConfigUtil.commitArcProdActiveKey(AppContext.getInstance(), activeKey); |
|
|
|
JSONObject object = obj.getJSONObject("data"); |
|
|
|
String activeKey = ""; |
|
|
|
if (object != null && object.has("activationCode")) { |
|
|
|
activeKey = object.optString("activationCode"); |
|
|
|
} |
|
|
|
if (!StringUtils.isEmpty(activeKey)) { |
|
|
|
activeArc(activeKey, false); |
|
|
|
ConfigUtil.commitArcProdActiveKey(AppContext.getInstance(), activeKey); |
|
|
|
} else { |
|
|
|
onFail("激活码为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
@@ -169,7 +177,8 @@ public class ArcSoftFaceCheckManager implements FaceCheckInterface { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onFail(String error) { |
|
|
|
Log.e(this.getClass().getSimpleName(), "new Heartbeat = " + error); |
|
|
|
Logger.e("arc error: " + error); |
|
|
|
Log.e(TAG, "new Heartbeat = " + error); |
|
|
|
} |
|
|
|
}; |
|
|
|
DigiWebSocketServer.getArcActivateKey(callback); |
|
|
|
|