Embed Connect in your mobile app using web views. Connect will broadcast an event with the message connect_exit when you should dismiss the webview. See below for specific implementation details.
class JsObject {@JavascriptInterface public boolean postMessage(String message, String transferList) { if (message.equals("connect_exit")) { //dismiss the webview here } return true; }}// And when initializing the webview webView.addJavascriptInterface(new JsObject(), "connectMessageHandler");
Connect will post an event using the connectMessageHandler object you created, with a message of connect_exit. When your application receives that message, you should dismiss the Connect webview.
WebView
class JsObject {@JavascriptInterface public boolean postMessage(String message, String transferList) { if (message.equals("connect_exit")) { //dismiss the webview here } return true; }}// And when initializing the webview webView.addJavascriptInterface(new JsObject(), "connectMessageHandler");
Connect will post an event using the connectMessageHandler object you created, with a message of connect_exit. When your application receives that message, you should dismiss the Connect webview.
const onMessage = (event) => { if (event?.nativeEvent?.data === 'connect_exit') { //dismiss web view here }}<WebView ... onMessage={onMessage} />
Connect will post an event using the onMessage handler you created, with a message of connect_exit. When your application receives that message, you should dismiss the Connect webview.
const onMessage = (event) => { if (event?.nativeEvent?.data === 'connect_exit') { //dismiss web view here }}<WebView ... onMessage={onMessage} />
Connect will post an event using the onMessage handler you created, with a message of connect_exit. When your application receives that message, you should dismiss the Connect webview.