Page 1 of 1

BrowserLadRequest for Android browser

Posted: Sun May 03, 2015 8:21 pm
by JosepM
Hi,

Any idea or workaround for this issue? How trap the URL from a browser from Android control?

Salut,
Josep M

Re: BrowserLadRequest for Android browser

Posted: Tue May 05, 2015 2:15 pm
by ramarjun
hi,

create the navigation control
on mouseUp
doAction "retreat"
end mouseUp
on mouseUp
doAction "advance"
end mouseUp

create the stop reload content

on mouseUp
doAction "stop"
end mouseUp

and
do action reload

Re: BrowserLadRequest for Android browser

Posted: Tue May 05, 2015 2:43 pm
by JosepM
Hi,

But first time I must load the page, one time is loaded is when I must trap the URLs. Where I must put the "mouseup", sorry but I don't understand it... :(

Re: BrowserLadRequest for Android browser

Posted: Wed May 06, 2015 11:21 am
by MaxV
What do you want to do exactly?
You can create a browser putting a native Android browser control.
Moreover you can add buttons to go back page, next page, reload, execute script.
The command is:

Code: Select all

mobileControlDo controlName, action
Action can be one of:
  • advance - Move forward through the history (wraps the goForward method of UIWebView).
  • retreat - Move backward through the history (wraps the goBack method of UIWebView).
  • reload - Reload the current page (wraps the reload method of UIWebView).
  • stop - Stop loading the current page (wraps the stopLoading method of UIWebView).
  • load baseUrl, htmlText - Loads as page consisting of the given htmlText with the given baseUrl (wraps theloadHtmlString method of UIWebView). Takes the following additional parameters:
    • baseUrl
    • htmlText
  • execute, script (Javascript)

Re: BrowserLadRequest for Android browser

Posted: Wed May 06, 2015 11:58 am
by JosepM
Hi,

I want trap the URL like the "on browserloadrequest" do for iOS but for Android don't work.
So one time I click on the URL the page is starting to load, I can't stop it, right?

Salut,
Jospe M

Re: BrowserLadRequest for Android browser

Posted: Wed May 06, 2015 2:45 pm
by MaxV
JosepM wrote: So one time I click on the URL the page is starting to load, I can't stop it, right?
This should work:

Code: Select all

mobileControlDo controlName,"stop"

Re: BrowserLadRequest for Android browser

Posted: Wed May 06, 2015 3:18 pm
by JosepM
Hi,

Yes, but the first time when the object is created? I don't see the way :(

Re: BrowserLadRequest for Android browser

Posted: Wed May 06, 2015 3:42 pm
by MaxV
You create a native browser with:

Code: Select all

mobilecontrolcreate  "browser","mybrowser"
mobilecontrolset  "mybrowser","rect",myrect
mobilecontrolset  "mybrowser","visible",true
No url is loaded.