Untitled
unknown
java
2 years ago
550 B
11
Indexable
class WebAppInterface(private val mContext: Context) {
/** Show a toast from the web page */
@JavascriptInterface
fun postMessage(message: String) {
val jsonModelMap = convertStringToJson(message).toMutableMap()
when (jsonModelMap["type"].toString()) {
"SendoExternalLogin" -> {
/** Function for login */
}
"SendoExternalLogout" -> {
/** Function for logout */
}
}
}
}Editor is loading...