Problems in webview component (java Android).
I created a screen to receive payments:
public class PaymentOnLineFragment extends Fragment {
}
This screen has only one component webview:
View v = inflater.inflate (R.layout.activity_pagamento, null);
xml with the layout has content:
<? Xml version = "1.0" encoding = "utf-8"?><LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" android: orientation = "horizontal" android: layout_width = "fill_parent" android: layout_height = "fill_parent"> <WebView android: id = "@ + id / webview" android: layout_width = "fill_parent" android: layout_height = "fill_parent" />
I carry my php page in webview:
webView.loadUrl("my_payment_link.php");
My problem is:
I need to update every 5 seconds my php page, so I did put in the of the page:
"onload="setTimeout ('delayer ()', 5000)" na tag body
The page opens normally in webview the first time, but when pass the 5 seconds is the refresh, the link is opened in the default android browser (another window opens) and the webview is not updated.
I want the page to be updated within the webview own (ie in my own application).
Does anyone know how to fix this?