installations package Stay organized with collections Save and categorize content based on your preferences.
The Firebase Installations Web SDK. This SDK does not work in a Node.js environment.
Functions
| Function | Description |
|---|---|
| function(app, ...) | |
| getInstallations(app) | Returns an instance ofInstallations associated with the givenFirebaseApp instance. |
| function(installations, ...) | |
| deleteInstallations(installations) | Deletes the Firebase Installation and all associated data. |
| getId(installations) | Creates a Firebase Installation if there isn't one for the app and returns the Installation ID. |
| getToken(installations, forceRefresh) | Returns a Firebase Installations auth token, identifying the current Firebase Installation. |
| onIdChange(installations, callback) | Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called. |
Interfaces
| Interface | Description |
|---|---|
| Installations | Public interface of the Firebase Installations SDK. |
Type Aliases
| Type Alias | Description |
|---|---|
| IdChangeCallbackFn | An user defined callback function that gets called when Installations ID changes. |
| IdChangeUnsubscribeFn | Unsubscribe a callback function previously added viaIdChangeCallbackFn. |
function(app, ...)
getInstallations(app)
Returns an instance ofInstallations associated with the givenFirebaseApp instance.
Signature:
exportdeclarefunctiongetInstallations(app?:FirebaseApp):Installations;Parameters
| Parameter | Type | Description |
|---|---|---|
| app | FirebaseApp | TheFirebaseApp instance. |
Returns:
function(installations, ...)
deleteInstallations(installations)
Deletes the Firebase Installation and all associated data.
Signature:
exportdeclarefunctiondeleteInstallations(installations:Installations):Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| installations | Installations | TheInstallations instance. |
Returns:
Promise<void>
getId(installations)
Creates a Firebase Installation if there isn't one for the app and returns the Installation ID.
Signature:
exportdeclarefunctiongetId(installations:Installations):Promise<string>;Parameters
| Parameter | Type | Description |
|---|---|---|
| installations | Installations | TheInstallations instance. |
Returns:
Promise<string>
getToken(installations, forceRefresh)
Returns a Firebase Installations auth token, identifying the current Firebase Installation.
Signature:
exportdeclarefunctiongetToken(installations:Installations,forceRefresh?:boolean):Promise<string>;Parameters
| Parameter | Type | Description |
|---|---|---|
| installations | Installations | TheInstallations instance. |
| forceRefresh | boolean | Force refresh regardless of token expiration. |
Returns:
Promise<string>
onIdChange(installations, callback)
Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called.
Signature:
exportdeclarefunctiononIdChange(installations:Installations,callback:IdChangeCallbackFn):IdChangeUnsubscribeFn;Parameters
| Parameter | Type | Description |
|---|---|---|
| installations | Installations | TheInstallations instance. |
| callback | IdChangeCallbackFn | The callback function that is invoked when FID changes. |
Returns:
A function that can be called to unsubscribe.
IdChangeCallbackFn
An user defined callback function that gets called when Installations ID changes.
Signature:
exporttypeIdChangeCallbackFn=(installationId:string)=>void;IdChangeUnsubscribeFn
Unsubscribe a callback function previously added viaIdChangeCallbackFn.
Signature:
exporttypeIdChangeUnsubscribeFn=()=>void;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 2024-11-14 UTC.