BrowserLadRequest for Android browser

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

BrowserLadRequest for Android browser

Post by JosepM »

Hi,

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

Salut,
Josep M
ramarjun
Posts: 2
Joined: Tue May 05, 2015 9:06 am

Re: BrowserLadRequest for Android browser

Post 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
web design company bangalore | web development company --- Nexevo Technologies
Http://www.nexevo.in
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: BrowserLadRequest for Android browser

Post 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... :(
MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: BrowserLadRequest for Android browser

Post 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)
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: BrowserLadRequest for Android browser

Post 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
MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: BrowserLadRequest for Android browser

Post 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"
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: BrowserLadRequest for Android browser

Post by JosepM »

Hi,

Yes, but the first time when the object is created? I don't see the way :(
MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: BrowserLadRequest for Android browser

Post 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.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Post Reply