I have a WebView that displays the Google Checkout payment button in html form.
When I run it on the emulator, it works, there is a payment button, and I can click it and go to the Google verification web page.
However, when I run it on the Android 2.2 device itself, it just shows a small blue box with a question mark.
what does it mean?
String header = "<html>" + "<head>" + "<script language=\"javascript\">"+ "function pass() {"+ "return checkboxState.checkboxPass();"+ "}"+ "</script>" + "</head>" + "<body>"; String formData = "<center>"+ "<form onSubmit=\"return pass();\" action=\"https://"+host+"api/checkout/v2/checkoutForm/Merchant/"+merchantId+"\" id=\"BB_BuyButtonForm\" method=\"post\" name=\"BB_BuyButtonForm\" target=\"_blank\">"+ "<input name=\"item_name_1\" type=\"hidden\" value=\""+item_name_1+"\"/>"+ "<input name=\"item_description_1\" type=\"hidden\" value=\""+item_name_1+"\"/>"+ "<input name=\"item_quantity_1\" type=\"hidden\" value=\"1\"/>"+ "<input name=\"item_price_1\" type=\"hidden\" value=\""+item_price_1+"\"/>"+ "<input name=\"item_currency_1\" type=\"hidden\" value=\""+item_currency_1+"\"/>"+ "<input name=\"_charset_\" type=\"hidden\" value=\"utf-8\"/>"+ "<input type=\"hidden\" name=\"shopping-cart.items.item-1.merchant-private-item-data\" value=\""+private_item_data+"\">"+ "<input alt=\"Pay With Google Checkout\" src=\"https://"+host+"buttons/buy.gif?merchant_id="+merchantId+"&w=121&h=44&style=trans&variant=text&loc=en_US\" type=\"image\"/>"+ "</form>"+ "</center>"; String footer = "</body></html>"; if(Logging.DEBUG) Log.d(TAG, header+formData+footer); browser = new WebView(ActivityActivate.this); browser.setBackgroundColor(0); browser.getSettings().setJavaScriptEnabled(true); browser.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); browser.getSettings().setSupportZoom(false); browser.addJavascriptInterface(new JavascriptInterface(), "checkboxState"); browser.loadData(header+formData+footer, "text/html", "UTF-8"); llPaymentButtons.addView(browser);
android webview
jax
source share