File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
android/app/src/main/java/com/compass/app Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1414import org .json .JSONObject ;
1515
1616public class MainActivity extends BridgeActivity {
17- public class NativeBridge {
17+ public static class NativeBridge {
1818 @ JavascriptInterface
1919 public boolean isNativeApp () {
2020 return true ;
@@ -32,9 +32,7 @@ protected void onNewIntent(Intent intent) {
3232 try {
3333 String payload = new JSONObject ().put ("data" , data ).toString ();
3434 Log .i ("CompassApp" , "Payload: " + payload );
35- bridge .getWebView ().post (() -> {
36- bridge .getWebView ().evaluateJavascript ("oauthRedirect(" + payload + ");" , null );
37- });
35+ bridge .getWebView ().post (() -> bridge .getWebView ().evaluateJavascript ("oauthRedirect(" + payload + ");" , null ));
3836 } catch (JSONException e ) {
3937 Log .i ("CompassApp" , "Failed to encode JSON payload" , e );
4038 }
You can’t perform that action at this time.
0 commit comments