I have a problem with Safety Detect SDK. When I'm trying to generate token I've got error from SDK that I need to update kit. Error code is 1212. I've checked on webpage https://developer.huawei.com/consumer/en/doc/development/hmscore-common-References/error-code-0000001050045846 that I need to update it in App Gallery but In App Gallery I don't have any updates. I've tried on two same phones (P40 lite) and error occures only on one of them. They have same version of HMS Core (6.6.0.332) , same version of OS (Android 12). I though it was combined with push-kit but I've updated agcp library with version 1.6.0.300 and push kit with version 6.5.0.300 without any luck. Maybe someone had the same problem with some other kits. Code which I'm using to generate token is pased below:
String appId = AGConnectServicesConfig.fromContext(cordova.getContext()).getString("client/app_id");
SafetyDetectClient mClient = SafetyDetect.getClient(getApplicationContext());
Task<SysIntegrityResp> task = mClient.sysIntegrity(nonce.getBytes(StandardCharsets.UTF_8), appId);
task.addOnSuccessListener(response -> {
Log.i(TAG, "Success getting token");
}).addOnFailureListener(e -> {
if (e instanceof ApiException) {
ApiException apiException = (ApiException) e;
Log.e("SysIntegrity", "Error: " + SafetyDetectStatusCodes.getStatusCodeString(apiException.getStatusCode()) + ": " + apiException.getMessage());
} else {
Log.e("SysIntegrity", "ERROR:" + e.getMessage());
}
});
I'll be very glad if someone could point me where I could update that.