@@ -35,7 +35,6 @@ protected void onNewIntent(Intent intent) {
3535 bridge .getWebView ().post (() -> {
3636 bridge .getWebView ().evaluateJavascript ("oauthRedirect(" + payload + ");" , null );
3737 });
38- // bridge.triggerJSEvent("oauthRedirect", "window", payload);
3938 } catch (JSONException e ) {
4039 Log .i ("CompassApp" , "Failed to encode JSON payload" , e );
4140 }
@@ -61,61 +60,7 @@ public void onCreate(Bundle savedInstanceState) {
6160 settings .setJavaScriptEnabled (true );
6261 webView .addJavascriptInterface (new NativeBridge (), "AndroidBridge" );
6362
64- // Allow remote URLs to still have access to Capacitor bridge
65- // webView.setWebViewClient(new BridgeWebViewClient(this.bridge) {
66- // @Override
67- // public boolean shouldOverrideUrlLoading(android.webkit.WebView view, String url) {
68- // if (url.startsWith("https://www.compassmeet.com")) {
69- // view.loadUrl(url);
70- // return true;
71- // }
72- // return super.shouldOverrideUrlLoading(view, url);
73- // }
74- // });
75- //
76- // // Load your remote site instead of local assets
77- // this.bridge.getWebView().loadUrl("https://www.compassmeet.com");
7863 }
7964
80- // @Override
81- // public void onActivityResult(int requestCode, int resultCode, Intent data) {
82- // super.onActivityResult(requestCode, resultCode, data);
83- //
84- // Log.i("Google Activity Result", "onActivityResult called with requestCode: " + requestCode + data);
85- //
86- // if (requestCode >= GoogleProvider.REQUEST_AUTHORIZE_GOOGLE_MIN && requestCode < GoogleProvider.REQUEST_AUTHORIZE_GOOGLE_MAX) {
87- // PluginHandle pluginHandle = getBridge().getPlugin("SocialLogin");
88- // if (pluginHandle == null) {
89- // Log.i("Google Activity Result", "SocialLogin login handle is null");
90- // return;
91- // }
92- // Plugin plugin = pluginHandle.getInstance();
93- // if (!(plugin instanceof SocialLoginPlugin)) {
94- // Log.i("Google Activity Result", "SocialLogin plugin instance is not SocialLoginPlugin");
95- // return;
96- // }
97- // Log.i("Google Activity Result", "Handling Google login intent");
98- // ((SocialLoginPlugin) plugin).handleGoogleLoginIntent(requestCode, data);
99- // }
100- // }
101-
102- // This function will never be called, leave it empty
103- // @Override
104- // public void IHaveModifiedTheMainActivityForTheUseWithSocialLoginPlugin() {
105- // }
106-
107- // private static final String LOCAL_URL = "file:///android_asset/public/server/pages";
108- // private static final String REMOTE_URL = "https://www.compassmeet.com";
109-
110- // Optional helper for future use
111- // public void loadLocalContent() {
112- // Log.i("CompassApp", "Loading local assets...");
113- // this.bridge.getWebView().loadUrl(LOCAL_URL);
114- // }
115- //
116- // public void loadRemoteContent() {
117- // Log.i("CompassApp", "Loading remote content...");
118- // this.bridge.getWebView().loadUrl(REMOTE_URL);
119- // }
12065}
12166
0 commit comments