diff --git a/code/smartphone.js b/code/smartphone.js index 3c38940f..cde15ab1 100644 --- a/code/smartphone.js +++ b/code/smartphone.js @@ -90,11 +90,12 @@ window.runOnSmartphonesAfterBoot = function() { // this is a hack, accessing Leaflet’s private _container is evil $(this._container).on('taphold', function() { + window.renderPortalDetails(guid); if (typeof android !== 'undefined' && android && android.portalLongPressed) { android.portalLongPressed(); + } else { + window.smartphone.sideButton.click(); } - window.renderPortalDetails(guid); - window.smartphone.sideButton.click(); }); }); }); diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java b/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java index 39dfcd54..94d948fa 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java @@ -140,9 +140,21 @@ public class IITC_WebViewClient extends WebViewClient { */ @Override public void onReceivedLoginRequest(WebView view, String realm, String account, String args) { + Log.d("iitcm", "Login requested: " + realm + " " + account + " " + args); ((IITC_Mobile) context).onReceivedLoginRequest(this, view, realm, account, args); } + @Override + public void onPageFinished(WebView view, String url) { + if (url.contains("accounts.google.com")) { + Log.d("iitcm", "reload after login"); + IITC_Mobile main_activity = ((IITC_Mobile) context); + main_activity.loadUrl(main_activity.intel_url); + return; + } + super.onPageFinished(view, url); + } + // parse all enabled iitc plugins // returns a string containing all plugins without their wrappers public String parsePlugins() {