Android Guides | Samples

Android.Content.Res.AssetManager Class

Provides access to an application's raw asset files; see Resources for the way most applications will want to retrieve their resource data.

See Also: AssetManager

Syntax

[Android.Runtime.Register("android/content/res/AssetManager", DoNotGenerateAcw=true)]
public sealed class AssetManager : Object

Remarks

Provides access to an application's raw asset files; see Resources for the way most applications will want to retrieve their resource data. This class presents a lower-level API that allows you to open and read raw files that have been bundled with the application as a simple stream of bytes.

[Android Documentation]

Requirements

Namespace: Android.Content.Res
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Content.Res.AssetManager are listed below.

See Also: Object

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Close()
Close this asset manager.
GetLocales() : String[]
Get the locales that this asset manager contains data for.
List(String) : String[]
Return a String array of all the assets at the given path.
ListAsync(String) : System.Threading.Tasks.Task<String[]>
Open(String) : Stream
Open an asset using ACCESS_STREAMING mode.
Open(String, Access) : Stream
Open an asset using an explicit access mode, returning an InputStream to read its contents.
OpenFd(String) : AssetFileDescriptor
OpenNonAssetFd(String) : AssetFileDescriptor
OpenNonAssetFd(Int32, String) : AssetFileDescriptor
OpenXmlResourceParser(String) : XmlReader
Retrieve a parser for a compiled XML file.
OpenXmlResourceParser(Int32, String) : XmlReader
Retrieve a parser for a compiled XML file.