@angular/fire 16.0.0-canary.596e208 → 16.0.0-canary.78407bc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +200 -0
- package/analytics/analytics.module.d.ts +2 -2
- package/analytics/firebase.d.ts +4 -1
- package/analytics/screen-tracking.service.d.ts +3 -3
- package/app-check/app-check.module.d.ts +3 -3
- package/app-check/firebase.d.ts +2 -1
- package/auth/auth.module.d.ts +2 -2
- package/auth/firebase.d.ts +3 -1
- package/auth-guard/auth-guard.d.ts +2 -2
- package/compat/analytics/analytics.d.ts +1 -3
- package/compat/analytics/analytics.module.d.ts +1 -1
- package/compat/analytics/screen-tracking.service.d.ts +1 -1
- package/compat/analytics/user-tracking.service.d.ts +1 -1
- package/compat/auth/auth.d.ts +3 -3
- package/compat/auth-guard/auth-guard.d.ts +2 -2
- package/compat/database/database.d.ts +4 -4
- package/compat/database/interfaces.d.ts +2 -2
- package/compat/database/list/audit-trail.d.ts +1 -1
- package/compat/database/list/create-reference.d.ts +1 -1
- package/compat/database/list/data-operation.d.ts +1 -1
- package/compat/database/list/state-changes.d.ts +1 -1
- package/compat/database/object/create-reference.d.ts +1 -1
- package/compat/database/observable/fromRef.d.ts +1 -1
- package/compat/database/utils.d.ts +1 -1
- package/compat/firebase.app.module.d.ts +1 -1
- package/compat/firestore/collection/collection.d.ts +2 -2
- package/compat/firestore/collection-group/collection-group.d.ts +2 -2
- package/compat/firestore/document/document.d.ts +4 -4
- package/compat/firestore/firestore.d.ts +7 -7
- package/compat/firestore/interfaces.d.ts +2 -2
- package/compat/functions/functions.d.ts +3 -3
- package/compat/messaging/messaging.d.ts +2 -2
- package/compat/performance/performance.d.ts +2 -2
- package/compat/remote-config/remote-config.d.ts +15 -49
- package/compat/storage/observable/fromTask.d.ts +1 -2
- package/compat/storage/ref.d.ts +1 -1
- package/compat/storage/storage.d.ts +3 -3
- package/compat/storage/task.d.ts +1 -1
- package/database/database.module.d.ts +2 -2
- package/docs/analytics.md +67 -0
- package/docs/app-check.md +53 -0
- package/docs/auth.md +165 -0
- package/docs/compat/analytics/getting-started.md +137 -0
- package/docs/compat/auth/getting-started.md +162 -0
- package/docs/compat/auth/router-guards.md +104 -0
- package/docs/compat/emulators/emulators.md +134 -0
- package/docs/compat/firestore/collections.md +326 -0
- package/docs/compat/firestore/documents.md +115 -0
- package/docs/compat/firestore/offline-data.md +39 -0
- package/docs/compat/firestore/querying-collections.md +204 -0
- package/docs/compat/functions/functions.md +166 -0
- package/docs/compat/messaging/messaging.md +232 -0
- package/docs/compat/performance/getting-started.md +132 -0
- package/docs/compat/remote-config/getting-started.md +134 -0
- package/docs/compat/rtdb/lists.md +257 -0
- package/docs/compat/rtdb/objects.md +182 -0
- package/docs/compat/rtdb/querying-lists.md +155 -0
- package/docs/compat/storage/storage.md +257 -0
- package/docs/compat.md +70 -0
- package/docs/database.md +175 -0
- package/docs/deploy/getting-started.md +204 -0
- package/docs/firebase.json +16 -0
- package/docs/firestore.md +148 -0
- package/docs/functions.md +52 -0
- package/docs/images/analytics-illo_1x.png +0 -0
- package/docs/images/auth-illo_1x.png +0 -0
- package/docs/images/cloud-messaging-illo_1x.png +0 -0
- package/docs/images/database-illo_1x.png +0 -0
- package/docs/images/firestore-illo_1x.png +0 -0
- package/docs/images/functions-illo_1x.png +0 -0
- package/docs/images/hosting-illo_1x.png +0 -0
- package/docs/images/performance-illo_1x.png +0 -0
- package/docs/images/reCAPTCHA-logo@1x.png +0 -0
- package/docs/images/remote-config-illo_1x.png +0 -0
- package/docs/images/storage-illo_1x.png +0 -0
- package/docs/install-and-setup.md +114 -0
- package/docs/install-angular-cli-windows10.md +82 -0
- package/docs/install-firebase-tools.md +78 -0
- package/docs/messaging.md +25 -0
- package/docs/performance.md +57 -0
- package/docs/remote-config.md +53 -0
- package/docs/storage.md +90 -0
- package/docs/universal/cloud-functions.md +96 -0
- package/docs/universal/getting-started.md +28 -0
- package/docs/universal/prerendering.md +72 -0
- package/docs/version-4-upgrade.md +119 -0
- package/docs/version-5-upgrade.md +82 -0
- package/docs/version-6-upgrade.md +16 -0
- package/docs/version-7-upgrade.md +298 -0
- package/esm2022/analytics/analytics.mjs +1 -1
- package/esm2022/analytics/analytics.module.mjs +10 -10
- package/esm2022/analytics/firebase.mjs +5 -2
- package/esm2022/analytics/screen-tracking.service.mjs +11 -10
- package/esm2022/analytics/user-tracking.service.mjs +5 -5
- package/esm2022/app/app.mjs +1 -1
- package/esm2022/app/app.module.mjs +9 -8
- package/esm2022/app-check/app-check.mjs +2 -2
- package/esm2022/app-check/app-check.module.mjs +10 -11
- package/esm2022/app-check/firebase.mjs +3 -2
- package/esm2022/auth/auth.mjs +1 -1
- package/esm2022/auth/auth.module.mjs +10 -10
- package/esm2022/auth/firebase.mjs +4 -2
- package/esm2022/auth-guard/auth-guard.mjs +8 -6
- package/esm2022/auth-guard/auth-guard.module.mjs +7 -7
- package/esm2022/compat/analytics/analytics.mjs +12 -13
- package/esm2022/compat/analytics/analytics.module.mjs +14 -11
- package/esm2022/compat/analytics/screen-tracking.service.mjs +9 -9
- package/esm2022/compat/analytics/user-tracking.service.mjs +7 -7
- package/esm2022/compat/auth/auth.mjs +13 -13
- package/esm2022/compat/auth/auth.module.mjs +7 -7
- package/esm2022/compat/auth-guard/auth-guard.mjs +8 -6
- package/esm2022/compat/auth-guard/auth-guard.module.mjs +7 -7
- package/esm2022/compat/cache.mjs +2 -1
- package/esm2022/compat/database/database.mjs +10 -10
- package/esm2022/compat/database/database.module.mjs +7 -7
- package/esm2022/compat/database/interfaces.mjs +1 -1
- package/esm2022/compat/database/list/audit-trail.mjs +3 -3
- package/esm2022/compat/database/list/changes.mjs +5 -5
- package/esm2022/compat/database/list/create-reference.mjs +5 -5
- package/esm2022/compat/database/list/data-operation.mjs +1 -1
- package/esm2022/compat/database/list/snapshot-changes.mjs +1 -1
- package/esm2022/compat/database/list/state-changes.mjs +2 -2
- package/esm2022/compat/database/object/create-reference.mjs +2 -2
- package/esm2022/compat/database/object/snapshot-changes.mjs +1 -1
- package/esm2022/compat/database/observable/fromRef.mjs +3 -2
- package/esm2022/compat/database/utils.mjs +1 -1
- package/esm2022/compat/firebase.app.mjs +1 -1
- package/esm2022/compat/firebase.app.module.mjs +11 -9
- package/esm2022/compat/firestore/collection/changes.mjs +2 -2
- package/esm2022/compat/firestore/collection/collection.mjs +4 -4
- package/esm2022/compat/firestore/collection-group/collection-group.mjs +4 -4
- package/esm2022/compat/firestore/document/document.mjs +4 -4
- package/esm2022/compat/firestore/firestore.mjs +11 -11
- package/esm2022/compat/firestore/firestore.module.mjs +7 -7
- package/esm2022/compat/firestore/interfaces.mjs +1 -1
- package/esm2022/compat/firestore/observable/fromRef.mjs +2 -2
- package/esm2022/compat/functions/functions.mjs +8 -8
- package/esm2022/compat/functions/functions.module.mjs +7 -7
- package/esm2022/compat/messaging/messaging.mjs +13 -12
- package/esm2022/compat/messaging/messaging.module.mjs +7 -7
- package/esm2022/compat/performance/performance.mjs +14 -20
- package/esm2022/compat/performance/performance.module.mjs +8 -9
- package/esm2022/compat/performance/performance.service.mjs +5 -4
- package/esm2022/compat/proxy.mjs +6 -7
- package/esm2022/compat/remote-config/remote-config.mjs +10 -11
- package/esm2022/compat/remote-config/remote-config.module.mjs +7 -7
- package/esm2022/compat/storage/observable/fromTask.mjs +3 -1
- package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +9 -9
- package/esm2022/compat/storage/ref.mjs +3 -3
- package/esm2022/compat/storage/storage.mjs +8 -8
- package/esm2022/compat/storage/storage.module.mjs +7 -7
- package/esm2022/compat/storage/task.mjs +2 -2
- package/esm2022/core.mjs +1 -3
- package/esm2022/database/database.mjs +1 -1
- package/esm2022/database/database.module.mjs +10 -10
- package/esm2022/firestore/firebase.mjs +22 -2
- package/esm2022/firestore/firestore.mjs +1 -1
- package/esm2022/firestore/firestore.module.mjs +10 -10
- package/esm2022/firestore/lite/firebase.mjs +11 -2
- package/esm2022/firestore/lite/lite.mjs +1 -1
- package/esm2022/firestore/lite/lite.module.mjs +9 -9
- package/esm2022/firestore/lite/rxfire.mjs +4 -2
- package/esm2022/firestore/rxfire.mjs +4 -4
- package/esm2022/functions/functions.mjs +1 -1
- package/esm2022/functions/functions.module.mjs +10 -10
- package/esm2022/messaging/messaging.mjs +1 -1
- package/esm2022/messaging/messaging.module.mjs +9 -9
- package/esm2022/performance/performance.mjs +1 -1
- package/esm2022/performance/performance.module.mjs +12 -12
- package/esm2022/remote-config/is-remote-config-supported-factory.mjs +2 -2
- package/esm2022/remote-config/remote-config.mjs +1 -1
- package/esm2022/remote-config/remote-config.module.mjs +9 -9
- package/esm2022/storage/storage.mjs +1 -1
- package/esm2022/storage/storage.module.mjs +10 -10
- package/esm2022/zones.mjs +9 -11
- package/fesm2022/angular-fire-analytics.mjs +18 -14
- package/fesm2022/angular-fire-analytics.mjs.map +1 -1
- package/fesm2022/angular-fire-app-check.mjs +8 -8
- package/fesm2022/angular-fire-app-check.mjs.map +1 -1
- package/fesm2022/angular-fire-app.mjs +6 -5
- package/fesm2022/angular-fire-app.mjs.map +1 -1
- package/fesm2022/angular-fire-auth-guard.mjs +13 -11
- package/fesm2022/angular-fire-auth-guard.mjs.map +1 -1
- package/fesm2022/angular-fire-auth.mjs +8 -6
- package/fesm2022/angular-fire-auth.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-analytics.mjs +29 -27
- package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-auth-guard.mjs +12 -10
- package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-auth.mjs +13 -13
- package/fesm2022/angular-fire-compat-auth.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-database.mjs +129 -128
- package/fesm2022/angular-fire-compat-database.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-firestore.mjs +96 -96
- package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-functions.mjs +10 -10
- package/fesm2022/angular-fire-compat-functions.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-messaging.mjs +13 -12
- package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-performance.mjs +23 -29
- package/fesm2022/angular-fire-compat-performance.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-remote-config.mjs +10 -11
- package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-storage.mjs +21 -19
- package/fesm2022/angular-fire-compat-storage.mjs.map +1 -1
- package/fesm2022/angular-fire-compat.mjs +15 -13
- package/fesm2022/angular-fire-compat.mjs.map +1 -1
- package/fesm2022/angular-fire-database.mjs +5 -5
- package/fesm2022/angular-fire-database.mjs.map +1 -1
- package/fesm2022/angular-fire-firestore-lite.mjs +19 -8
- package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -1
- package/fesm2022/angular-fire-firestore.mjs +30 -10
- package/fesm2022/angular-fire-firestore.mjs.map +1 -1
- package/fesm2022/angular-fire-functions.mjs +6 -6
- package/fesm2022/angular-fire-functions.mjs.map +1 -1
- package/fesm2022/angular-fire-messaging.mjs +4 -4
- package/fesm2022/angular-fire-messaging.mjs.map +1 -1
- package/fesm2022/angular-fire-performance.mjs +7 -7
- package/fesm2022/angular-fire-performance.mjs.map +1 -1
- package/fesm2022/angular-fire-remote-config.mjs +4 -4
- package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
- package/fesm2022/angular-fire-storage.mjs +4 -4
- package/fesm2022/angular-fire-storage.mjs.map +1 -1
- package/fesm2022/angular-fire.mjs +7 -11
- package/fesm2022/angular-fire.mjs.map +1 -1
- package/firestore/firebase.d.ts +21 -1
- package/firestore/firestore.module.d.ts +2 -2
- package/firestore/lite/firebase.d.ts +10 -1
- package/firestore/lite/lite.module.d.ts +2 -2
- package/firestore/lite/rxfire.d.ts +3 -1
- package/firestore/rxfire.d.ts +3 -3
- package/functions/functions.module.d.ts +2 -2
- package/messaging/messaging.module.d.ts +2 -2
- package/package.json +12 -12
- package/performance/performance.module.d.ts +2 -2
- package/remote-config/remote-config.module.d.ts +2 -2
- package/schematics/add/index.js +1 -1
- package/schematics/add/schema.json +16 -0
- package/schematics/builders.json +10 -0
- package/schematics/collection.json +15 -0
- package/schematics/common.js +1 -1
- package/schematics/deploy/actions.js +11 -11
- package/schematics/deploy/builder.js +2 -2
- package/schematics/deploy/schema.json +119 -0
- package/schematics/migration.json +15 -0
- package/schematics/setup/index.js +5 -6
- package/schematics/setup/prompts.js +5 -6
- package/schematics/setup/schema.json +16 -0
- package/schematics/update/index.js +1 -1
- package/schematics/update/v7/index.js +2 -2
- package/schematics/utils.js +4 -4
- package/storage/storage.module.d.ts +2 -2
- package/publish.sh +0 -1
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { InjectionToken, NgZone } from '@angular/core';
|
|
2
|
-
import { MonoTypeOperatorFunction, Observable, OperatorFunction } from 'rxjs';
|
|
3
2
|
import { ɵAngularFireSchedulers } from '@angular/fire';
|
|
4
3
|
import { ɵPromiseProxy } from '@angular/fire/compat';
|
|
5
4
|
import { FirebaseOptions } from 'firebase/app';
|
|
6
5
|
import firebase from 'firebase/compat/app';
|
|
6
|
+
import { MonoTypeOperatorFunction, Observable, OperatorFunction } from 'rxjs';
|
|
7
7
|
import { Settings } from './interfaces';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export
|
|
10
|
-
[key: string]: string | number | boolean;
|
|
11
|
-
}
|
|
9
|
+
export type ConfigTemplate = Record<string, string | number | boolean>;
|
|
12
10
|
export declare const SETTINGS: InjectionToken<firebase.remoteConfig.Settings>;
|
|
13
11
|
export declare const DEFAULTS: InjectionToken<ConfigTemplate>;
|
|
14
12
|
export interface AngularFireRemoteConfig extends ɵPromiseProxy<firebase.remoteConfig.RemoteConfig> {
|
|
@@ -33,53 +31,21 @@ export declare class AngularFireRemoteConfig {
|
|
|
33
31
|
private zone;
|
|
34
32
|
readonly changes: Observable<Parameter>;
|
|
35
33
|
readonly parameters: Observable<Parameter[]>;
|
|
36
|
-
readonly numbers: Observable<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[key: string]: Observable<number>;
|
|
40
|
-
};
|
|
41
|
-
readonly booleans: Observable<{
|
|
42
|
-
[key: string]: boolean | undefined;
|
|
43
|
-
}> & {
|
|
44
|
-
[key: string]: Observable<boolean>;
|
|
45
|
-
};
|
|
46
|
-
readonly strings: Observable<{
|
|
47
|
-
[key: string]: string | undefined;
|
|
48
|
-
}> & {
|
|
49
|
-
[key: string]: Observable<string | undefined>;
|
|
50
|
-
};
|
|
34
|
+
readonly numbers: Observable<Record<string, number | undefined>> & Record<string, Observable<number>>;
|
|
35
|
+
readonly booleans: Observable<Record<string, boolean | undefined>> & Record<string, Observable<boolean>>;
|
|
36
|
+
readonly strings: Observable<Record<string, string | undefined>> & Record<string, Observable<string | undefined>>;
|
|
51
37
|
constructor(options: FirebaseOptions, name: string | null | undefined, settings: Settings | null, defaultConfig: ConfigTemplate | null, zone: NgZone, schedulers: ɵAngularFireSchedulers, platformId: Object);
|
|
52
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<AngularFireRemoteConfig, [null, { optional: true; }, { optional: true; }, { optional: true; }, null, null, null]>;
|
|
53
39
|
static ɵprov: i0.ɵɵInjectableDeclaration<AngularFireRemoteConfig>;
|
|
54
40
|
}
|
|
55
41
|
export declare const budget: <T>(interval: number) => MonoTypeOperatorFunction<T>;
|
|
56
|
-
export declare function scanToObject(): OperatorFunction<Parameter,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export declare function scanToObject(to: '
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
export declare function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export declare function
|
|
66
|
-
[key: string]: string | undefined;
|
|
67
|
-
}>;
|
|
68
|
-
export declare function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & {
|
|
69
|
-
[key: string]: string | undefined;
|
|
70
|
-
}>;
|
|
71
|
-
export declare function mapToObject(): OperatorFunction<Parameter[], {
|
|
72
|
-
[key: string]: string | undefined;
|
|
73
|
-
}>;
|
|
74
|
-
export declare function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], {
|
|
75
|
-
[key: string]: number | undefined;
|
|
76
|
-
}>;
|
|
77
|
-
export declare function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], {
|
|
78
|
-
[key: string]: boolean | undefined;
|
|
79
|
-
}>;
|
|
80
|
-
export declare function mapToObject(to: 'strings'): OperatorFunction<Parameter[], {
|
|
81
|
-
[key: string]: string | undefined;
|
|
82
|
-
}>;
|
|
83
|
-
export declare function mapToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter[], T & {
|
|
84
|
-
[key: string]: string | undefined;
|
|
85
|
-
}>;
|
|
42
|
+
export declare function scanToObject(): OperatorFunction<Parameter, Record<string, string | undefined>>;
|
|
43
|
+
export declare function scanToObject(to: 'numbers'): OperatorFunction<Parameter, Record<string, number | undefined>>;
|
|
44
|
+
export declare function scanToObject(to: 'booleans'): OperatorFunction<Parameter, Record<string, boolean | undefined>>;
|
|
45
|
+
export declare function scanToObject(to: 'strings'): OperatorFunction<Parameter, Record<string, string | undefined>>;
|
|
46
|
+
export declare function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & Record<string, string | undefined>>;
|
|
47
|
+
export declare function mapToObject(): OperatorFunction<Parameter[], Record<string, string | undefined>>;
|
|
48
|
+
export declare function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], Record<string, number | undefined>>;
|
|
49
|
+
export declare function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], Record<string, boolean | undefined>>;
|
|
50
|
+
export declare function mapToObject(to: 'strings'): OperatorFunction<Parameter[], Record<string, string | undefined>>;
|
|
51
|
+
export declare function mapToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter[], T & Record<string, string | undefined>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { UploadTask } from '../interfaces';
|
|
3
|
-
|
|
4
|
-
export declare function fromTask(task: UploadTask): Observable<firebase.storage.UploadTaskSnapshot>;
|
|
3
|
+
export declare function fromTask(task: UploadTask): Observable<import("firebase/compat").default.storage.UploadTaskSnapshot>;
|
package/compat/storage/ref.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { ListOptions, ListResult, Reference, SettableMetadata, UploadMetadata } from './interfaces';
|
|
2
3
|
import { AngularFireUploadTask } from './task';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
4
|
export interface AngularFireStorageReference {
|
|
5
5
|
getDownloadURL(): Observable<any>;
|
|
6
6
|
getMetadata(): Observable<any>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InjectionToken, NgZone } from '@angular/core';
|
|
2
2
|
import { ɵAngularFireSchedulers } from '@angular/fire';
|
|
3
|
+
import { AppCheckInstances } from '@angular/fire/app-check';
|
|
3
4
|
import { FirebaseOptions } from 'firebase/app';
|
|
5
|
+
import firebase from 'firebase/compat/app';
|
|
4
6
|
import { UploadMetadata } from './interfaces';
|
|
5
7
|
import 'firebase/compat/storage';
|
|
6
|
-
import firebase from 'firebase/compat/app';
|
|
7
|
-
import { AppCheckInstances } from '@angular/fire/app-check';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare const BUCKET: InjectionToken<string>;
|
|
10
10
|
export declare const MAX_UPLOAD_RETRY_TIME: InjectionToken<number>;
|
|
@@ -21,7 +21,7 @@ export declare const USE_EMULATOR: InjectionToken<[host: string, port: number, o
|
|
|
21
21
|
*/
|
|
22
22
|
export declare class AngularFireStorage {
|
|
23
23
|
readonly storage: firebase.storage.Storage;
|
|
24
|
-
constructor(options: FirebaseOptions, name: string | null | undefined, storageBucket: string | null, platformId: Object, zone: NgZone, schedulers: ɵAngularFireSchedulers, maxUploadRetryTime:
|
|
24
|
+
constructor(options: FirebaseOptions, name: string | null | undefined, storageBucket: string | null, platformId: Object, zone: NgZone, schedulers: ɵAngularFireSchedulers, maxUploadRetryTime: any, maxOperationRetryTime: any, _useEmulator: any, _appCheckInstances: AppCheckInstances);
|
|
25
25
|
ref(path: string): import("./ref").AngularFireStorageReference;
|
|
26
26
|
refFromURL(path: string): import("./ref").AngularFireStorageReference;
|
|
27
27
|
upload(path: string, data: any, metadata?: UploadMetadata): import("@angular/fire/compat/storage").AngularFireUploadTask;
|
package/compat/storage/task.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UploadTask, UploadTaskSnapshot } from './interfaces';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { UploadTask, UploadTaskSnapshot } from './interfaces';
|
|
3
3
|
export interface AngularFireUploadTask {
|
|
4
4
|
task: UploadTask;
|
|
5
5
|
snapshotChanges(): Observable<UploadTaskSnapshot | undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectionToken, Injector, ModuleWithProviders, NgZone } from '@angular/core';
|
|
2
|
+
import { FirebaseApp } from '@angular/fire/app';
|
|
2
3
|
import { Database as FirebaseDatabase } from 'firebase/database';
|
|
3
4
|
import { Database } from './database';
|
|
4
|
-
import { FirebaseApp } from '@angular/fire/app';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare const PROVIDED_DATABASE_INSTANCES: InjectionToken<Database[]>;
|
|
7
7
|
export declare function defaultDatabaseInstanceFactory(provided: FirebaseDatabase[] | undefined, defaultApp: FirebaseApp): Database;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<img align="right" width="30%" src="images/analytics-illo_1x.png">
|
|
2
|
+
|
|
3
|
+
<small>
|
|
4
|
+
<a href="https://github.com/angular/angularfire">AngularFire</a> ❱ <a href="../README.md#developer-guide">Developer Guide</a> ❱ Analytics
|
|
5
|
+
</small>
|
|
6
|
+
|
|
7
|
+
# Analytics
|
|
8
|
+
|
|
9
|
+
Google Analytics is an app measurement solution, available at no charge, that provides insight on app usage and user engagement.
|
|
10
|
+
|
|
11
|
+
[Learn more](https://firebase.google.com/docs/analytics)
|
|
12
|
+
## Dependency Injection
|
|
13
|
+
|
|
14
|
+
As a prerequisite, ensure that `AngularFire` has been added to your project via
|
|
15
|
+
```bash
|
|
16
|
+
ng add @angular/fire
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Provide a Google Analytics instance in the application's `NgModule` (`app.module.ts`):
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
@NgModule({
|
|
23
|
+
declarations: [
|
|
24
|
+
...
|
|
25
|
+
],
|
|
26
|
+
imports: [
|
|
27
|
+
...
|
|
28
|
+
// App initialization
|
|
29
|
+
provideFirebaseApp(() => initializeApp(environment.firebase)),
|
|
30
|
+
provideAnalytics(() => getAnalytics())
|
|
31
|
+
],
|
|
32
|
+
providers: [],
|
|
33
|
+
bootstrap: [AppComponent]
|
|
34
|
+
})
|
|
35
|
+
export class AppModule { }
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
In your component class, for example `user-profile.component.ts` import and inject `Firestore`:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { Component, inject } from '@angular/core';
|
|
42
|
+
import { Analytics } from '@angular/fire/analytics';
|
|
43
|
+
|
|
44
|
+
@Component({
|
|
45
|
+
standalone: true,
|
|
46
|
+
selector: 'app-user-profile',
|
|
47
|
+
...
|
|
48
|
+
})
|
|
49
|
+
export class UserProfileComponent {
|
|
50
|
+
private analytics: Analytics = inject(Analytics);
|
|
51
|
+
...
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Firebase API
|
|
56
|
+
|
|
57
|
+
The [Firebase API for Google Analytics documentation](https://firebase.google.com/docs/reference/js/analytics.md#analytics_package) is available on the Firebase website.
|
|
58
|
+
|
|
59
|
+
## Services
|
|
60
|
+
|
|
61
|
+
### ScreenTrackingService
|
|
62
|
+
|
|
63
|
+
Coming soon, for now [please review the documentation](https://firebase.google.com/docs/analytics/screenviews)
|
|
64
|
+
|
|
65
|
+
### UserTrackingService
|
|
66
|
+
Coming soon
|
|
67
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<small>
|
|
2
|
+
<a href="https://github.com/angular/angularfire">AngularFire</a> ❱ <a href="../README.md#developer-guide">Developer Guide</a> ❱ Realtime App Check
|
|
3
|
+
</small>
|
|
4
|
+
|
|
5
|
+
<img align="right" width="30%" src="images/reCAPTCHA-logo@1x.png">
|
|
6
|
+
|
|
7
|
+
# App Check
|
|
8
|
+
|
|
9
|
+
App Check helps protect your API resources from abuse by preventing unauthorized clients from accessing your backend resources. It works with both Firebase services, Google Cloud services, and your own APIs to keep your resources safe.
|
|
10
|
+
|
|
11
|
+
[Learn More](https://firebase.google.com/docs/app-check)
|
|
12
|
+
|
|
13
|
+
## Dependency Injection
|
|
14
|
+
As a prerequisite, ensure that `AngularFire` has been added to your project via
|
|
15
|
+
```bash
|
|
16
|
+
ng add @angular/fire
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Provide an App Check instance and configuration in the application's `NgModule` (`app.module.ts`):
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
23
|
+
import { provideAppCheck } from '@angular/fire/app-check';
|
|
24
|
+
|
|
25
|
+
@NgModule({
|
|
26
|
+
imports: [
|
|
27
|
+
provideFirebaseApp(() => initializeApp(environment.firebase)),
|
|
28
|
+
provideAppCheck(() => initializeAppCheck(getApp(), {
|
|
29
|
+
provider: new ReCaptchaV3Provider(/* configuration */),
|
|
30
|
+
})),
|
|
31
|
+
]
|
|
32
|
+
})
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Next inject it into your component:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { Component, inject} from '@angular/core';
|
|
39
|
+
import { AppCheck } from '@angular/fire/app-check';
|
|
40
|
+
|
|
41
|
+
@Component({ ... })
|
|
42
|
+
export class AppCheckComponent {
|
|
43
|
+
private appCheck: AppCheck = inject(AppCheck);
|
|
44
|
+
...
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Firebase API
|
|
49
|
+
|
|
50
|
+
The [AppCheck documentation](https://firebase.google.com/docs/reference/js/app-check) is available on the Firebase website.
|
|
51
|
+
|
|
52
|
+
## Convenience observables
|
|
53
|
+
Coming soon.
|
package/docs/auth.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<img align="right" width="30%" src="images/auth-illo_1x.png">
|
|
2
|
+
|
|
3
|
+
<small>
|
|
4
|
+
<a href="https://github.com/angular/angularfire">AngularFire</a> ❱ <a href="../README.md#developer-guide">Developer Guide</a> ❱ Authentication
|
|
5
|
+
</small>
|
|
6
|
+
|
|
7
|
+
# Authentication
|
|
8
|
+
|
|
9
|
+
Most apps need to know the identity of a user. Knowing a user's identity allows an app to securely save user data in the cloud and provide the same personalized experience across all of the user's devices.
|
|
10
|
+
Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more.
|
|
11
|
+
|
|
12
|
+
Firebase Authentication integrates tightly with other Firebase services, and it leverages industry standards like OAuth 2.0 and OpenID Connect, so it can be easily integrated with your custom backend.
|
|
13
|
+
|
|
14
|
+
[Learn more about Firebase Authentication](https://firebase.google.com/docs/auth)
|
|
15
|
+
|
|
16
|
+
## Dependency Injection
|
|
17
|
+
|
|
18
|
+
As a prerequisite, ensure that `AngularFire` has been added to your project via
|
|
19
|
+
```bash
|
|
20
|
+
ng add @angular/fire
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Provide an auth instance in the application's `NgModule` (`app.module.ts`):
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
27
|
+
import { getAuth, provideAuth } from '@angular/fire/auth';
|
|
28
|
+
|
|
29
|
+
@NgModule({
|
|
30
|
+
imports: [
|
|
31
|
+
provideFirebaseApp(() => initializeApp(environment.firebase)),
|
|
32
|
+
provideAuth(() => getAuth()),
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Next inject it into your component:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { Component, inject} from '@angular/core';
|
|
41
|
+
import { Auth } from '@angular/fire/auth';
|
|
42
|
+
|
|
43
|
+
@Component({ ... })
|
|
44
|
+
export class LoginComponent {
|
|
45
|
+
private auth: Auth = inject(Auth);
|
|
46
|
+
...
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Firebase API
|
|
51
|
+
|
|
52
|
+
AngularFire wraps the Firebase JS SDK to ensure proper functionality in Angular, while providing the same API.
|
|
53
|
+
|
|
54
|
+
Update the imports from `import { ... } from 'firebase/auth'` to `import { ... } from '@angular/fire/auth'` and follow the offical documentation.
|
|
55
|
+
|
|
56
|
+
[Getting Started](https://firebase.google.com/docs/auth/web/start) | [API Reference](https://firebase.google.com/docs/reference/js/auth)
|
|
57
|
+
|
|
58
|
+
## Convenience observables
|
|
59
|
+
|
|
60
|
+
AngularFire provides observables to allow convenient use of the Firebase Authentication with RXJS.
|
|
61
|
+
|
|
62
|
+
### user
|
|
63
|
+
|
|
64
|
+
The `user` observable streams events triggered by sign-in, sign-out, and token refresh events.
|
|
65
|
+
|
|
66
|
+
Example code:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { Auth, User, user } from '@angular/fire/auth';
|
|
70
|
+
...
|
|
71
|
+
|
|
72
|
+
export class UserComponent implements OnDestroy {
|
|
73
|
+
private auth: Auth = inject(Auth);
|
|
74
|
+
user$ = user(auth);
|
|
75
|
+
userSubscription: Subscription;
|
|
76
|
+
...
|
|
77
|
+
|
|
78
|
+
constructor() {
|
|
79
|
+
this.userSubscription = this.user$.subscribe((aUser: User | null) => {
|
|
80
|
+
//handle user state changes here. Note, that user will be null if there is no currently logged in user.
|
|
81
|
+
console.log(aUser);
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
ngOnDestroy() {
|
|
86
|
+
// when manually subscribing to an observable remember to unsubscribe in ngOnDestroy
|
|
87
|
+
this.userSubscription.unsubscribe();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### authState
|
|
94
|
+
|
|
95
|
+
The `authState` observable streams events triggered by sign-in and sign-out events.
|
|
96
|
+
|
|
97
|
+
Example code:
|
|
98
|
+
```ts
|
|
99
|
+
import { Auth, authState } from '@angular/fire/auth';
|
|
100
|
+
...
|
|
101
|
+
|
|
102
|
+
export class UserComponent implements OnDestroy {
|
|
103
|
+
private auth: Auth = inject(Auth);
|
|
104
|
+
authState$ = authState(auth);
|
|
105
|
+
authStateSubscription: Subscription;
|
|
106
|
+
...
|
|
107
|
+
|
|
108
|
+
constructor() {
|
|
109
|
+
this.authStateSubscription = this.authState$.subscribe((aUser: User | null) => {
|
|
110
|
+
//handle auth state changes here. Note, that user will be null if there is no currently logged in user.
|
|
111
|
+
console.log(aUser);
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
ngOnDestroy() {
|
|
116
|
+
// when manually subscribing to an observable remember to unsubscribe in ngOnDestroy
|
|
117
|
+
this.authStateSubscription.unsubscribe();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### idToken
|
|
123
|
+
|
|
124
|
+
The `idToken` observable streams events triggered by sign-in, sign-out and token refresh events.
|
|
125
|
+
|
|
126
|
+
Example code:
|
|
127
|
+
```ts
|
|
128
|
+
import { Auth, idToken } from '@angular/fire/auth';
|
|
129
|
+
...
|
|
130
|
+
|
|
131
|
+
export class UserComponent implements OnDestroy {
|
|
132
|
+
private auth: Auth = inject(Auth);
|
|
133
|
+
idToken$ = idToken(auth);
|
|
134
|
+
idTokenSubscription: Subscription;
|
|
135
|
+
...
|
|
136
|
+
|
|
137
|
+
constructor() {
|
|
138
|
+
this.idTokenSubscription = this.idToken$.subscribe((token: string | null) => {
|
|
139
|
+
//handle idToken changes here. Note, that user will be null if there is no currently logged in user.
|
|
140
|
+
console.log(string);
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
ngOnDestroy() {
|
|
145
|
+
// when manually subscribing to an observable remember to unsubscribe in ngOnDestroy
|
|
146
|
+
this.idTokenSubscription.unsubscribe();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Connecting the emulator suite
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import { connectAuthEmulator, getAuth, provideAuth } from '@angular/fire/auth';
|
|
155
|
+
|
|
156
|
+
@NgModule({
|
|
157
|
+
imports: [
|
|
158
|
+
provideAuth(() => {
|
|
159
|
+
const auth = getAuth();
|
|
160
|
+
connectAuthEmulator(auth, 'http://localhost:9099', { disableWarnings: true });
|
|
161
|
+
return auth;
|
|
162
|
+
}),
|
|
163
|
+
]
|
|
164
|
+
})
|
|
165
|
+
```
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Getting started with Google Analytics
|
|
2
|
+
|
|
3
|
+
`AngularFireAnalytics` dynamically imports the `firebase/analytics` library and provides a promisified version of the [Firebase Analytics SDK (`firebase.analytics.Analytics`)](https://firebase.google.com/docs/reference/js/firebase.analytics.Analytics.html).
|
|
4
|
+
|
|
5
|
+
> **NOTE**: [AngularFire has a new tree-shakable API](../../../README.md#developer-guide), you're looking at the documentation for the compatability version of the library. [See the v7 upgrade guide for more information on this change.](../../version-7-upgrade.md).
|
|
6
|
+
|
|
7
|
+
### API:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
class AngularFireAnalytics {
|
|
11
|
+
updateConfig(options: {[key:string]: any}): Promise<void>;
|
|
12
|
+
|
|
13
|
+
// from firebase.analytics() proxy:
|
|
14
|
+
logEvent(eventName: string, eventParams?: {[key: string]: any}, options?: analytics.AnalyticsCallOptions): Promise<void>;
|
|
15
|
+
setCurrentScreen(screenName: string, options?: analytics.AnalyticsCallOptions): Promise<void>;
|
|
16
|
+
setUserId(id: string, options?: analytics.AnalyticsCallOptions): Promise<void>;
|
|
17
|
+
setUserProperties(properties: analytics.CustomParams, options?: analytics.AnalyticsCallOptions): Promise<void>;
|
|
18
|
+
setAnalyticsCollectionEnabled(enabled: boolean): Promise<void>;
|
|
19
|
+
app: Promise<app.App>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
COLLECTION_ENABLED = InjectionToken<boolean>;
|
|
23
|
+
APP_VERSION = InjectionToken<string>;
|
|
24
|
+
APP_NAME = InjectionToken<string>;
|
|
25
|
+
DEBUG_MODE = InjectionToken<boolean>;
|
|
26
|
+
CONFIG = InjectionToken<Config>;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Usage:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { AngularFireAnalyticsModule } from '@angular/fire/compat/analytics';
|
|
33
|
+
|
|
34
|
+
@NgModule({
|
|
35
|
+
imports: [
|
|
36
|
+
AngularFireModule.initializeApp(environment.firebase),
|
|
37
|
+
AngularFireAnalyticsModule
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
export class AppModule { }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`AngularFireAnalyticsModule` will dynamically import and configure `firebase/analytics`. A `page_view` event will automatically be logged (see `CONFIG` below if you wish to disable this behavior.)
|
|
44
|
+
|
|
45
|
+
In your component you can then dependency inject `AngularFireAnalytics` and make calls against the SDK:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { AngularFireAnalytics } from '@angular/fire/compat/analytics';
|
|
49
|
+
|
|
50
|
+
constructor(analytics: AngularFireAnalytics) {
|
|
51
|
+
analytics.logEvent('custom_event', { ... });
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Tracking Screen Views
|
|
56
|
+
|
|
57
|
+
You can log [`screen_view` events](https://firebase.google.com/docs/reference/js/firebase.analytics.Analytics.html#parameters_10) yourself of course, but AngularFire provides the `ScreenTrackingService` which automatically integrates with the Angular Router to provide Firebase with screen view tracking. You simply can integrate like so:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { AngularFireAnalyticsModule, ScreenTrackingService } from '@angular/fire/compat/analytics';
|
|
61
|
+
|
|
62
|
+
@NgModule({
|
|
63
|
+
imports: [
|
|
64
|
+
AngularFireModule.initializeApp(environment.firebase),
|
|
65
|
+
AngularFireAnalyticsModule
|
|
66
|
+
],
|
|
67
|
+
providers: [
|
|
68
|
+
ScreenTrackingService
|
|
69
|
+
]
|
|
70
|
+
})
|
|
71
|
+
export class AppModule { }
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`AngularFireAnalyticsModule` will initialize `ScreenTrackingService` if it is provided.
|
|
75
|
+
|
|
76
|
+
## Tracking User Identifiers
|
|
77
|
+
|
|
78
|
+
To enrich your Analytics data you can track the currently signed in user by setting [`setuserid`](https://firebase.google.com/docs/reference/js/firebase.analytics.Analytics.html#setuserid) and [`setUserProperties`](https://firebase.google.com/docs/reference/js/firebase.analytics.Analytics.html#set-user-properties). AngularFire provides a `UserTrackingService` which will dynamically import `firebase/auth`, monitor for changes in the logged in user, and call `setuserid` for you automatically.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { AngularFireAnalyticsModule, UserTrackingService } from '@angular/fire/compat/analytics';
|
|
83
|
+
|
|
84
|
+
@NgModule({
|
|
85
|
+
imports: [
|
|
86
|
+
AngularFireModule.initializeApp(environment.firebase),
|
|
87
|
+
AngularFireAnalyticsModule
|
|
88
|
+
],
|
|
89
|
+
providers: [
|
|
90
|
+
UserTrackingService
|
|
91
|
+
]
|
|
92
|
+
})
|
|
93
|
+
export class AppModule { }
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`AngularFireAnalyticsModule` will initialize `UserTrackingService` if it is provided.
|
|
97
|
+
|
|
98
|
+
## Configuration with Dependency Injection
|
|
99
|
+
|
|
100
|
+
### Configure Google Analtyics with `CONFIG`
|
|
101
|
+
|
|
102
|
+
Using the `CONFIG` DI Token (*default: {}*) will allow you to configure Google Analytics. E.g, you could skip sending the initial `page_view` event, anonymize IP addresses, and disallow ads personalization signals for all events like so:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
import { AngularFireAnalyticsModule, CONFIG } from '@angular/fire/compat/analytics';
|
|
106
|
+
|
|
107
|
+
@NgModule({
|
|
108
|
+
imports: [
|
|
109
|
+
AngularFireModule.initializeApp(environment.firebase),
|
|
110
|
+
AngularFireAnalyticsModule
|
|
111
|
+
],
|
|
112
|
+
providers: [
|
|
113
|
+
{ provide: CONFIG, useValue: {
|
|
114
|
+
send_page_view: false,
|
|
115
|
+
allow_ad_personalization_signals: false,
|
|
116
|
+
anonymize_ip: true
|
|
117
|
+
} }
|
|
118
|
+
]
|
|
119
|
+
})
|
|
120
|
+
export class AppModule { }
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
See the gtag.js documentation to learn of the different configuration options at your disposal.
|
|
124
|
+
|
|
125
|
+
### Use DebugView `DEBUG_MODE`
|
|
126
|
+
|
|
127
|
+
To use [DebugView in Analytics](https://console.firebase.google.com/project/_/analytics/debugview) set `DEBUG_MODE` to `true` (*default: false*).
|
|
128
|
+
|
|
129
|
+
### Track deployments with `APP_NAME` and `APP_VERSION`
|
|
130
|
+
|
|
131
|
+
If you provide `APP_NAME` and `APP_VERSION` (*default: undefined*) you will be able to [track version adoption](https://console.firebase.google.com/project/_/analytics/latestrelease) of your PWA.
|
|
132
|
+
|
|
133
|
+
### Disable analytics collection via `COLLECTION_ENABLED`
|
|
134
|
+
|
|
135
|
+
If you set `COLLECTION_ENABLED` (*default: true*) to `false` then analytics collection will be disabled for this app on this device. To opt back in to analytics collection you could then call `setAnalyticsCollectionEnabled(true)`.
|
|
136
|
+
|
|
137
|
+
Putting these APIs to use with cookies would allow you to create a flexible analytics collection scheme that would respect your user's desire for privacy.
|