Android Can't Find Path to Web folder

Alan alanstenhouse at hotmail.com
Sun Apr 8 06:28:02 EDT 2018


I find that on Android you don't use the "file:" prefix - try:

set the url of widget "about" to (specialFolderPath("resources") & "/web/index.html")

HTH

cheers

Alan

> On 8 Apr 2018, at 7:30 pm, Sannyasin Brahmanathaswami <brahma at hindu.org> wrote:
> 
> I give up! What is the magic that gets the browser widget on Android to see a local html file
> 
> (it always works in iOS)
> 
> given the following directory layout
> 
> myApp.livecode # the standalone is built from this
>      /module
>           lexicon.livecode  # with nothing but a browser widget which points too:
>                /web
>                    index.html
> 
> if have tried all manner of:
> 
> hard coded:
> 
>     set the itemdel to "/"
>     get item 1 to -2 of the effective filename of this stack
>     put it & "/web/index.html" into tURL
>     set the URL of widget "Browser" to ("file://" & tURL)
> 
> # this works on iOS but not on Android 
> 
> # Various incarnations of
> 
> if isMobile() then
>     # this work on iOS 
>     # but not on Android
> 
>  put specialFolderPath("engine") into tRoot
>  set the URL of widget "Browser" to ( "file://" &tRoot & "/modules/lexicon/web/index.html")
> 
> else
>     # works on desktop
> 
>    put specialFolderPath("resources") into tRoot    
>    set the URL of widget "Browser" to ( "file://" &tRoot & "/web/index.html")
> end if
> 
> ?? 
> 
> BR





More information about the use-livecode mailing list