v2.2.5: In-app logging, ISP blocking detection, Latin script fix

This commit is contained in:
zarzet
2026-01-10 19:03:39 +07:00
parent f12c18d76b
commit 11e7034cec
25 changed files with 2327 additions and 185 deletions
@@ -284,6 +284,39 @@ class MainActivity: FlutterActivity() {
}
result.success(response)
}
// Log methods
"getLogs" -> {
val response = withContext(Dispatchers.IO) {
Gobackend.getLogs()
}
result.success(response)
}
"getLogsSince" -> {
val index = call.argument<Int>("index") ?: 0
val response = withContext(Dispatchers.IO) {
Gobackend.getLogsSince(index.toLong())
}
result.success(response)
}
"clearLogs" -> {
withContext(Dispatchers.IO) {
Gobackend.clearLogs()
}
result.success(null)
}
"getLogCount" -> {
val count = withContext(Dispatchers.IO) {
Gobackend.getLogCount()
}
result.success(count.toInt())
}
"setLoggingEnabled" -> {
val enabled = call.argument<Boolean>("enabled") ?: false
withContext(Dispatchers.IO) {
Gobackend.setLoggingEnabled(enabled)
}
result.success(null)
}
else -> result.notImplemented()
}
} catch (e: Exception) {