Problems in webview component (java Android) -


problems in webview component (java android).

i created screen receive payments:

public class paymentonlinefragment extends fragment { } 

this screen has 1 component webview:

view v = inflater.inflate (r.layout.activity_pagamento, null); 

xml 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 php page in webview:

webview.loadurl("my_payment_link.php"); 

my problem is:

i need update every 5 seconds php page, did put in of page:

 "onload="settimeout ('delayer ()', 5000)" na tag body 

the page opens in webview first time, when pass 5 seconds refresh, link opened in default android browser (another window opens) , webview not updated.

i want page updated within webview own (ie in own application).

does know how fix this?

why don't reload page android code instead of using javascript? thread or handler, , call mwebview.loadurl("http://www.websitehere.php"); every n seconds!


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -