AndroidApp class

A reference to a Firebase Android app.

Do not call this constructor directly. Instead, useProjectManagement.androidApp().

Signature:

exportdeclareclassAndroidApp

Properties

PropertyModifiersTypeDescription
appIdstring

Methods

MethodModifiersDescription
addShaCertificate(certificateToAdd)Adds the given SHA certificate to this Android app.
deleteShaCertificate(certificateToDelete)Deletes the specified SHA certificate from this Android app.
getConfig()Gets the configuration artifact associated with this app.
getMetadata()Retrieves metadata about this Android app.
getShaCertificates()Gets the list of SHA certificates associated with this Android app in Firebase.
setDisplayName(newDisplayName)Sets the optional user-assigned display name of the app.

AndroidApp.appId

Signature:

readonlyappId:string;

AndroidApp.addShaCertificate()

Adds the given SHA certificate to this Android app.

Signature:

addShaCertificate(certificateToAdd:ShaCertificate):Promise<void>;

Parameters

ParameterTypeDescription
certificateToAddShaCertificateThe SHA certificate to add.

Returns:

Promise<void>

A promise that resolves when the given certificate has been added to the Android app.

AndroidApp.deleteShaCertificate()

Deletes the specified SHA certificate from this Android app.

Signature:

deleteShaCertificate(certificateToDelete:ShaCertificate):Promise<void>;

Parameters

ParameterTypeDescription
certificateToDeleteShaCertificateThe SHA certificate to delete.

Returns:

Promise<void>

A promise that resolves when the specified certificate has been removed from the Android app.

AndroidApp.getConfig()

Gets the configuration artifact associated with this app.

Signature:

getConfig():Promise<string>;

Returns:

Promise<string>

A promise that resolves to the Android app's Firebase config file, in UTF-8 string format. This string is typically intended to be written to a JSON file that gets shipped with your Android app.

AndroidApp.getMetadata()

Retrieves metadata about this Android app.

Signature:

getMetadata():Promise<AndroidAppMetadata>;

Returns:

Promise<AndroidAppMetadata>

A promise that resolves to the retrieved metadata about this Android app.

AndroidApp.getShaCertificates()

Gets the list of SHA certificates associated with this Android app in Firebase.

Signature:

getShaCertificates():Promise<ShaCertificate[]>;

Returns:

Promise<ShaCertificate[]>

The list of SHA-1 and SHA-256 certificates associated with this Android app in Firebase.

AndroidApp.setDisplayName()

Sets the optional user-assigned display name of the app.

Signature:

setDisplayName(newDisplayName:string):Promise<void>;

Parameters

ParameterTypeDescription
newDisplayNamestringThe new display name to set.

Returns:

Promise<void>

A promise that resolves when the display name has been set.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-07-29 UTC.