Local File in Browser Widget on Android - Fail

Sannyasin Brahmanathaswami brahma at hindu.org
Thu Aug 10 23:36:58 EDT 2017


make sure your slashes are all correct. on iOS and desktop  are forgiving with double// in URLs; but android is not.. .this bit me many times

file:/somepath/somefile.html

works

file://somepath/somefile.html  

doesn't  

So If you have path setters here and there, one needs to follow some convention, either leave folder string *always* with no closing slash and all appended url strings begin with a slash.. I started that way but this was always confusing to me because on web / means "from DOCROOT"   so slowly I am refactoring all these to

function path_Assets
    return specialFolderPath("documents") & "/assets/" 
end path_Assets

then in any module we use 

play sound (path_Assets() & "bells-whistles/ding.mp3")  because this is "relative" # very subjective..

So what started failing on Android --  really hard to debug!

where instances of 

play sound (path_Assets() & "/bells-whistles/ding.mp3") 

because these would work on Mac desktop and only fail on Android so you are beating your head "what is wrong."


On 8/10/17, 1:28 PM, "use-livecode on behalf of Dan Friedman via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    I’m having a problem loading a local file on Android in the Browser Widget in LC 8.1.5.  I am experiencing what is described in bug 19036.  But, bug 19036’s status is “Resolved” in version 8.0.0.   So, is something else up?  Anyone have any insight?
    
    -Dan 
    
    



More information about the Use-livecode mailing list