增加生物认证的包和权限

This commit is contained in:
cebgcontract 2022-07-26 13:32:03 +08:00
parent 6653e4c7ef
commit edc04c7b3b
3 changed files with 12 additions and 0 deletions

View File

@ -48,4 +48,5 @@
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
</manifest>

View File

@ -108,5 +108,6 @@ dependencies {
implementation project(':libcocos2dx')
implementation "androidx.appcompat:appcompat:1.0.2"
implementation "androidx.biometric:biometric:1.1.0"
implementation files('../libs/unity-classes.jar')
}

View File

@ -200,3 +200,13 @@ function sendErc20(funId, address, to, amount) {
})
}
function restoreFromMnemonic(mnemonic, password) {
try {
diameter = parseFloat(diameter);
let result = jc.wallet.restoreFromMnemonic(mnemonic, password);
return JSON.stringify({errcode: 0, data: result});
} catch(err) {
return JSON.stringify({errcode: 1, errmsg: err});
}
}