How do I determine whether a path is a local file or not

Viewed 12689

Given just a location as a string, is there a reliable way to determine if this is a local file (such as /mnt/sdcard/test.jpg) or a remote resource (such as http://www.xyz.com/test.jpg)?

Converting it to a Uri with Uri.parse doesn't seem to give me anything to indicate where the file is.

I don't really want to have to look for // in the string!

6 Answers
Related