我正在尝试将Uber API集成到我的应用中。出于身份验证的目的,我使用的是Uber API提供的授权URL。每当用户使用Uber按钮单击登录时,我都会将授权URL加载到Web视图中。加载Web视图后,我开始键入联系人号码。需要登录,但是当我开始输入联系号码
时,未加载国家/地区代码这就是我加载授权网址的方式:
AlertDialog.Builder alert = new android.support.v7.app.AlertDialog.Builder(mContext);
alert.setTitle("Login");
WebView wv = new WebView(mContext){
@Override
public boolean onCheckIsTextEditor() {
return true;
}
};
wv.setWebViewClient(new WebViewClient() {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
Log.d(TAG, "onPageStarted: Loading...");
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
Log.d(TAG, "onPageFinished: Url Loaded");
}
@Override
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
super.onReceivedError(view, request, error);
}
});
wv.loadUrl(finalAuthorizationUrl);
alert.setView(wv);
alert.show();
答案 0 :(得分:1)
我通过添加以下代码来修复此问题:
CREATE VIEW Example4 AS
SELECT *
FROM invoices JOIN
Vendors
on Invoices.VendorID = Vendors.VendorID
WHERE InvoiceTotal - PaymentTotal - CreditTotal > 0;
现在工作正常。