Page 1 of 1

AndroidBrowser

Posted: Tue Mar 11, 2014 1:39 pm
by bohmgyorgy1990
Hy!

I have a browser in my android app. I would like to do that if the user click a button/link/anything in this browser and if this link is navigate him to the other page ( example: facebook -> anything other page what doesnt have the "facebook" string in own domain), he get a pop up window and he can choose his own mobile browsers to open it ( chrome, opera, etc ).

Kind regards,

bgy

Re: AndroidBrowser

Posted: Thu Mar 13, 2014 4:35 am
by Simon
Hi bohmgyorgy1990,
This is working

Code: Select all

global gURL
on browserStartedLoading pUrl
   if "facebook" is not in pUrl then --check
      answer "going off site" 
       mobileControlSet sBrowserId, "url", gURL --return to last facebook page
   end if
   put true into gCount
   put "Started loading:" && pUrl into field "Status"
end browserStartedLoading

on browserFinishedLoading pUrl
   put "Finished loading:" && pUrl into field "Status"
   put pUrl into field "Url"
    put pUrl into gURL --load the global
end browserFinishedLoading
Adding the global gURL means that your opening url must have "facebook" in it.
This locks you app to facebook only sites.

Simon

Re: AndroidBrowser

Posted: Thu Mar 20, 2014 4:44 pm
by bohmgyorgy1990
it is actually work for me, thanks for it.