I am trying to get a Uri
from a file
object like so:
File file = new File("/sdcard/MyFolder/MyFile.txt");
var androidUri = Android.Net.Uri.FromFile(file).ToString();
var javaUri = file.ToURI().ToString();
this returns the following values:
androidUri = "file:///sdcard/MyFolder/MyFile.txt"
javaUri = "file:/sdcard/MyFolder/MyFile.txt"
so my question is whats the difference between the Java.Net.Uri
and Android.Net.Uri
are these two values supposed to be different? When should they be used?
Update
I found the two documentation pages Java.Net.Uri and Android.Net.Uri and both say:
Builds and parses URI references which conform to RFC 2396.
Therefore surely this is a bug and they should return the same string?