mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-16 04:27:45 -04:00
Cleanup
This commit is contained in:
@@ -35,7 +35,6 @@ public class MainActivity extends BridgeActivity {
|
||||
bridge.getWebView().post(() -> {
|
||||
bridge.getWebView().evaluateJavascript("oauthRedirect(" + payload + ");", null);
|
||||
});
|
||||
// bridge.triggerJSEvent("oauthRedirect", "window", payload);
|
||||
} catch (JSONException e) {
|
||||
Log.i("CompassApp", "Failed to encode JSON payload", e);
|
||||
}
|
||||
@@ -61,61 +60,7 @@ public class MainActivity extends BridgeActivity {
|
||||
settings.setJavaScriptEnabled(true);
|
||||
webView.addJavascriptInterface(new NativeBridge(), "AndroidBridge");
|
||||
|
||||
// Allow remote URLs to still have access to Capacitor bridge
|
||||
// webView.setWebViewClient(new BridgeWebViewClient(this.bridge) {
|
||||
// @Override
|
||||
// public boolean shouldOverrideUrlLoading(android.webkit.WebView view, String url) {
|
||||
// if (url.startsWith("https://www.compassmeet.com")) {
|
||||
// view.loadUrl(url);
|
||||
// return true;
|
||||
// }
|
||||
// return super.shouldOverrideUrlLoading(view, url);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// // Load your remote site instead of local assets
|
||||
// this.bridge.getWebView().loadUrl("https://www.compassmeet.com");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
// super.onActivityResult(requestCode, resultCode, data);
|
||||
//
|
||||
// Log.i("Google Activity Result", "onActivityResult called with requestCode: " + requestCode + data);
|
||||
//
|
||||
// if (requestCode >= GoogleProvider.REQUEST_AUTHORIZE_GOOGLE_MIN && requestCode < GoogleProvider.REQUEST_AUTHORIZE_GOOGLE_MAX) {
|
||||
// PluginHandle pluginHandle = getBridge().getPlugin("SocialLogin");
|
||||
// if (pluginHandle == null) {
|
||||
// Log.i("Google Activity Result", "SocialLogin login handle is null");
|
||||
// return;
|
||||
// }
|
||||
// Plugin plugin = pluginHandle.getInstance();
|
||||
// if (!(plugin instanceof SocialLoginPlugin)) {
|
||||
// Log.i("Google Activity Result", "SocialLogin plugin instance is not SocialLoginPlugin");
|
||||
// return;
|
||||
// }
|
||||
// Log.i("Google Activity Result", "Handling Google login intent");
|
||||
// ((SocialLoginPlugin) plugin).handleGoogleLoginIntent(requestCode, data);
|
||||
// }
|
||||
// }
|
||||
|
||||
// This function will never be called, leave it empty
|
||||
// @Override
|
||||
// public void IHaveModifiedTheMainActivityForTheUseWithSocialLoginPlugin() {
|
||||
// }
|
||||
|
||||
// private static final String LOCAL_URL = "file:///android_asset/public/server/pages";
|
||||
// private static final String REMOTE_URL = "https://www.compassmeet.com";
|
||||
|
||||
// Optional helper for future use
|
||||
// public void loadLocalContent() {
|
||||
// Log.i("CompassApp", "Loading local assets...");
|
||||
// this.bridge.getWebView().loadUrl(LOCAL_URL);
|
||||
// }
|
||||
//
|
||||
// public void loadRemoteContent() {
|
||||
// Log.i("CompassApp", "Loading remote content...");
|
||||
// this.bridge.getWebView().loadUrl(REMOTE_URL);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user