"browserLoadRequest" for Android???

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
genie
Posts: 108
Joined: Thu Dec 01, 2011 7:19 am

"browserLoadRequest" for Android???

Post by genie » Fri Sep 20, 2013 5:03 am

Hello!

According to the dictionary, browserLoadRequest is only for iOS. By any chance, is there something similar I could use for Android?

I have a card with a browser in it. The browser displays a map (an image) and pins. Pins have "href" so when tapped, the browser loads the particular URL. Depending on what the URL contains, the app would then proceed to another card.

Code: Select all

on browserLoadRequest pUrl, pReason
   set the itemDel to "/"
   put the last item of pUrl into theID
   if the first char of theID is not "G" then
      go cd "one"
   else 
      go cd "two"
   end if
end browserLoadRequest
Problem is, I can't have this working for Android because browserLoadRequest handler only works for iOS.

browserFinishedLoading however, works for both iOS and Android, but I do not want to browser to go ahead and continue loading the URL because it isn't really a valid URL. The content on the href just acts like a parameter or some ID for me to know which of the pins is tapped. If I would allow it to load, I would have "webpage not available" when I get back to that card with browser. So, I hope to trap it on load request.

Any advices?


Thanks,
Genie

quartermaster
Posts: 1
Joined: Tue Dec 10, 2013 12:41 am

Re: "browserLoadRequest" for Android???

Post by quartermaster » Tue Dec 17, 2013 6:05 pm

I just began working with LiveCode and I have this very same issue. I have found this question asked in only one or two other LiveCode forums around the Web, but none of them have had any responses either. It's unfortunate that there does not seem to be a way to do this.

Klaus
Posts: 13864
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: "browserLoadRequest" for Android???

Post by Klaus » Tue Dec 17, 2013 6:24 pm

Hi Quartermaster,
quartermaster wrote:It's unfortunate that there does not seem to be a way to do this.
yes, it is! 8)

Nevertheless, welcome to the forum! :D


Best

Klaus

dhurtt
Posts: 42
Joined: Sat Nov 09, 2013 7:37 pm
Location: Huachuca City, AZ

Re: "browserLoadRequest" for Android???

Post by dhurtt » Sun Jan 19, 2014 4:54 am

Two items:

1. Can you use the message browserStartedLoading to look at the URL, pull out the information you need, and decide whether you want to reset the URL? I am sure it would be ugly, but maybe combined with a lock screen?

2. Doesn't your browserLoadRequest code example require a "pass browserLoadRequest" statement? EDIT: I just realized that you said you DON'T want the browser to go to that URL, so I answered my own question.

This difference between the iOS and Android engine implementations (or perhaps platform limitations) causes me some dismay. The browserLoadRequest message is exactly the solution to a problem I was pondering. That it does not work for Android leaves me with the decision on whether I support Android initially, which hurts the "cross-platform, single code base" theory of LiveCode.

Regards,

Dale

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: "browserLoadRequest" for Android???

Post by rinzwind » Sat Feb 06, 2016 8:37 pm

browserLoadRequest for iOS does not seem to fire anymore too..

Post Reply

Return to “Internet”