Changed app font to Lato. Changes for anrdoid version

This commit is contained in:
M
2020-11-11 17:55:18 +02:00
parent 882c57a132
commit ad3142aeb9
33 changed files with 75 additions and 103 deletions
@@ -4,7 +4,7 @@ import android.app.Activity
import android.os.AsyncTask
import android.os.Looper
import android.os.Handler
import android.os.Process
import android.os.Process
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
@@ -22,10 +22,10 @@ class doAsync(val handler: () -> Unit) : AsyncTask<Void, Void, Void>() {
class CwMoneroPlugin: MethodCallHandler {
companion object {
val moneroApi = MoneroApi()
// val moneroApi = MoneroApi()
val main = Handler(Looper.getMainLooper());
init {
init {
System.loadLibrary("cw_monero")
}
@@ -43,31 +43,31 @@ class CwMoneroPlugin: MethodCallHandler {
val password = call.argument("password") ?: ""
val useSSL = false
val isLightWallet = false
doAsync {
try {
moneroApi.setNodeAddressJNI(uri, login, password, useSSL, isLightWallet)
main.post({
result.success(true)
});
} catch(e: Throwable) {
main.post({
result.error("CONNECTION_ERROR", e.message, null)
});
}
}.execute()
// doAsync {
// try {
// moneroApi.setNodeAddressJNI(uri, login, password, useSSL, isLightWallet)
// main.post({
// result.success(true)
// });
// } catch(e: Throwable) {
// main.post({
// result.error("CONNECTION_ERROR", e.message, null)
// });
// }
// }.execute()
}
if (call.method == "startSync") {
doAsync {
moneroApi.startSyncJNI()
main.post({
result.success(true)
});
}.execute()
// doAsync {
// moneroApi.startSyncJNI()
// main.post({
// result.success(true)
// });
// }.execute()
}
if (call.method == "loadWallet") {
val path = call.argument("path") ?: ""
val password = call.argument("password") ?: ""
moneroApi.loadWalletJNI(path, password)
// moneroApi.loadWalletJNI(path, password)
result.success(true)
}
}
@@ -1,14 +0,0 @@
package com.cakewallet.monero
class MoneroApi {
external fun setNodeAddressJNI(uri: String, login: String, password: String, use_ssl: Boolean, is_light_wallet: Boolean)
external fun connectToNodeJNI()
external fun startSyncJNI()
external fun loadWalletJNI(path: String, password: String)
companion object {
init {
System.loadLibrary("cw_monero")
}
}
}