How do I determine whether a path is a local file or not
uri format is
<protocol>://<server:port>/<path>
local files have:
file:///mnt/...
or just
/mnt
so if string starts with
\w+?://
and this is not file:// then this is url
You can also check with the android.webkit.URLUtil
class
URLUtil.isFileUrl(file) || URLUtil.isContentUrl(file)
or any other member function of the aforementioned class. Preceding it with validation is advised:
URLUtil.isValidUrl(file)