- uri
- The desired URI to open.
- mode
- The file mode to use, as per ContentProvider.OpenAssetFile(Android.Net.Uri, System.String).
Documentation for this section has not yet been entered.
Type Reason Java.IO.FileNotFoundException Throws FileNotFoundException of no file exists under the URI or the mode is invalid.
Open a raw file descriptor to access data under a URI. This interacts with the underlying ContentProvider.OpenAssetFile(Android.Net.Uri, System.String) method of the provider associated with the given URI, to retrieve any file stored there.
A Uri object can be used to reference a resource in an APK file. The Uri should be one of the following formats:
java Example
Uri uri = Uri.parse("android.resource://com.example.myapp/" + R.raw.my_resource");
java Example
Uri uri = Uri.parse("android.resource://com.example.myapp/raw/my_resource");
Note that if this function is called for read-only input (mode is "r") on a content: URI, it will instead call ContentResolver.OpenTypedAssetFileDescriptor(Android.Net.Uri, System.String, System.String) for you with a MIME type of "*/*". This allows such callers to benefit from any built-in data conversion that a provider implements.