Untitled

 avatar
unknown
java
2 years ago
550 B
9
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...