MCPcopy Create free account
hub / github.com/NativeScript/firebase / constructor

Method constructor

packages/firebase-database/index.android.ts:637–647  ·  view source on GitHub ↗
(app?: FirebaseApp)

Source from the content-addressed store, hash-verified

635 _native: com.google.firebase.database.FirebaseDatabase;
636 _app: FirebaseApp;
637 constructor(app?: FirebaseApp) {
638 if (app?.native) {
639 this._native = com.google.firebase.database.FirebaseDatabase.getInstance(app.native);
640 } else {
641 if (defaultDatabase) {
642 return defaultDatabase;
643 }
644 defaultDatabase = this;
645 this._native = com.google.firebase.database.FirebaseDatabase.getInstance();
646 }
647 }
648
649 useEmulator(host: string, port: number) {
650 this.native.useEmulator(host === 'localhost' || host === '127.0.0.1' ? '10.0.2.2' : host, port);

Callers

nothing calls this directly

Calls 1

getInstanceMethod · 0.45

Tested by

no test coverage detected