How to WWW a file on Android?

I’m trying to load a file on Android using WWW and I’m getting an error.

void Start()
{
    WWW downloadedAsset = new WWW("file://sdcard/Music/mywavfile.wav") ;
}

Void Update()
{
    if (downloadedAsset.isDone)
        if (downloadedAsset.error != null )
            Debug.Log("WWW - Download - ERROR -> "+downloadedAsset.error) ;
        else
            [Do stuff]
}

*I keep getting the error “java.io.ioexception unable to connect to server - Host is unresolved:sdcard” *

I have found that but that’s not helping :frowning:

Do you have any idea please?

The problem was that “sdcard” is NOT a folder, but some sort of link to the sdcard. It was so not a real path. The real path was “mnt/sdcard”

Works well with

WWW downloadedAsset = new WWW(“file:///sdcard/Music/mywavfile.wav”) ;
Yes three “/” :wink: