Android WebView中的弹出窗口不会显示为Google Calendar Auth

时间:2018-03-13 02:04:01

标签: javascript android webview google-calendar-api

我有一个包含嵌入其中的Google日历的网络应用。我现在想在我的Android应用程序中的WebView中的WebView中加载此Web应用程序。为了显示日历,用户必须按下打开Goog​​le Auth弹出窗口的按钮才能授权我拉取Google日历。这适用于桌面,iOS(浏览器和WebView)和Android(浏览器但 WebView),但Google日历登录/验证屏幕不会在Android WebView中显示。

我的活动(在Android中):

itertools.izip

尝试解决方案:

  • https://stackoverflow.com/a/12576142/4206520

  • How to open webview in popupwindow in android?

  • https://stackoverflow.com/a/10170378/4206520

  • https://stackoverflow.com/a/9173368/4206520

  • https://stackoverflow.com/a/43726430/4206520

  • 编辑还尝试了@ Sagar的建议,使用public class WebView extends AppCompatActivity { android.webkit.WebView myWebView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_web_view); myWebView = (android.webkit.WebView) findViewById(R.id.webview); WebSettings webSettings = myWebView.getSettings(); //// // ISSUE: I expected one of these to allow the popup screen to show webSettings.setJavaScriptEnabled(true); webSettings.setDomStorageEnabled(true); webSettings.setUserAgentString("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"); webSettings.setAllowFileAccess(true); webSettings.setJavaScriptCanOpenWindowsAutomatically(true); webSettings.setSupportMultipleWindows(true); // ISSUE^ //// myWebView.loadUrl("https://mywebsite.com/"); } @Override protected void onSaveInstanceState(Bundle outState ) { super.onSaveInstanceState(outState); myWebView.saveState(outState); } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); myWebView.restoreState(savedInstanceState); } } 代替弹出广告,但Google不允许OAuth通过onReceivedHttpAuthRequest每个here,所以我需要弄清楚如何让OAuth弹出窗口显示

是否有人理解为什么Google Auth屏幕无法在Android上的WebView中显示?

真的卡住并坚持这个,所以提前感谢:)

0 个答案:

没有答案