PackageManager.GetText(String, Int32, ApplicationInfo) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieve text from a package.
public string? GetText (string packageName, int resid, Android.Content.PM.ApplicationInfo? appInfo);
member this.GetText : string * int * Android.Content.PM.ApplicationInfo -> string
Parameters
- packageName
- String
The name of the package that this text is coming from. Cannot be null.
- resid
- Int32
The resource identifier of the desired text. Cannot be 0.
- appInfo
- ApplicationInfo
Overall information about <var>packageName</var>. This may be null, in which case the application information will be retrieved for you if needed; if you already have this information around, it can be much more efficient to supply it here.
Returns
Returns a CharSequence holding the requested text. Returns null if the text could not be found for any reason.
Remarks
Retrieve text from a package. This is a low-level API used by the various package manager info structures (such as ComponentInfo
to implement retrieval of their associated labels and other text.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.