Opening default android browser with a URL and parameter passing in android -
i'm trying pass on url of form:
http://foo.com?param1=somevalue
to android browser, however, once url sent browser in form exactly,
the browser seems append forward slash url follows:
http://foo.com/?param1=somevalue
and surprisingly, android browser having trouble parsing this. i'm not sure why breaks url.
the invoking code this:
intent sampleintent = new intent(intent.action_view, uri.parse(sampleurl)); startactivity(sampleintent);
is bug android browser or need differently here?
if closely read how can open android browser specified post parameters? question , comments, think might answer. says cannot add params post start browser using intent, allows that. there solution @pete doing wish, inside webview
(if might want consider):
webview webview = new webview(this); setcontentview(webview); byte[] post = encodingutils.getbytes("postvariable=value&nextvar=value2", "base64"); webview.posturl("http://www.geenie.nl/anheli/mobile/ranking/demo/index.php", post)
hope helps in someway.
update
check out opening url on android web browser causes google search question. talks using urlencoder.encode before passing in url. might help.
Comments
Post a Comment