Merge pull request 'Unlock for Android' (#6) from theme into unlock
Reviewed-on: #6
This commit is contained in:
commit
ac42583993
|
@ -71,11 +71,11 @@ class MainActivity: FlutterActivity() {
|
||||||
Log.i("MainActivity.kt", "got event chan: " + eventbus_chan + " launching corouting...")
|
Log.i("MainActivity.kt", "got event chan: " + eventbus_chan + " launching corouting...")
|
||||||
GlobalScope.launch(Dispatchers.IO) {
|
GlobalScope.launch(Dispatchers.IO) {
|
||||||
while(true) {
|
while(true) {
|
||||||
val jsonEvent = Cwtch.getAppBusEvent()
|
//val jsonEvent = Cwtch.getAppBusEvent()
|
||||||
Log.i("MainActivity.kt", "got appbusEvent: " + jsonEvent)
|
// Log.i("MainActivity.kt", "got appbusEvent: " + jsonEvent)
|
||||||
launch(Dispatchers.Main) {
|
// launch(Dispatchers.Main) {
|
||||||
eventbus_chan.invokeMethod("AppbusEvent", jsonEvent)
|
// //eventbus_chan.invokeMethod("AppbusEvent", jsonEvent)
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +90,12 @@ class MainActivity: FlutterActivity() {
|
||||||
val pass = (call.argument("pass") as? String) ?: "";
|
val pass = (call.argument("pass") as? String) ?: "";
|
||||||
Cwtch.createProfile(nick, pass)
|
Cwtch.createProfile(nick, pass)
|
||||||
}
|
}
|
||||||
|
"LoadProfiles" -> {
|
||||||
|
val pass = (call.argument("pass") as? String) ?: "";
|
||||||
|
Cwtch.loadProfiles(pass)
|
||||||
|
}
|
||||||
"GetProfiles" -> result.success(Cwtch.getProfiles())
|
"GetProfiles" -> result.success(Cwtch.getProfiles())
|
||||||
"ACNEvents" -> result.success(Cwtch.acnEvents())
|
// "ACNEvents" -> result.success(Cwtch.acnEvents())
|
||||||
"ContactEvents" -> result.success(Cwtch.contactEvents())
|
"ContactEvents" -> result.success(Cwtch.contactEvents())
|
||||||
"GetContacts" -> {
|
"GetContacts" -> {
|
||||||
val onion = (call.argument("profile") as? String) ?: "";
|
val onion = (call.argument("profile") as? String) ?: "";
|
||||||
|
|
|
@ -32,8 +32,8 @@ class CwtchGomobile implements Cwtch {
|
||||||
androidHomeDirectory = getApplicationDocumentsDirectory();
|
androidHomeDirectory = getApplicationDocumentsDirectory();
|
||||||
androidLibraryDir = appInfoPlatform.invokeMethod('getNativeLibDir');
|
androidLibraryDir = appInfoPlatform.invokeMethod('getNativeLibDir');
|
||||||
|
|
||||||
final appbusEventChannel = MethodChannel(appbusEventChannelName);
|
// final appbusEventChannel = MethodChannel(appbusEventChannelName);
|
||||||
appbusEventChannel.setMethodCallHandler(this._handleAppbusEvent);
|
// appbusEventChannel.setMethodCallHandler(this._handleAppbusEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> Start() async {
|
Future<void> Start() async {
|
||||||
|
|
Loading…
Reference in New Issue