| 277 | return Firebase._inForeground; |
| 278 | } |
| 279 | constructor() { |
| 280 | if (firebaseInstance) { |
| 281 | return firebaseInstance; |
| 282 | } |
| 283 | firebaseInstance = this; |
| 284 | |
| 285 | Application.on('launch', (args) => { |
| 286 | Firebase._onResumeQueue.forEach((callback) => { |
| 287 | callback(); |
| 288 | }); |
| 289 | Firebase._onResumeQueue.splice(0); |
| 290 | }); |
| 291 | |
| 292 | Application.on('resume', (args) => { |
| 293 | Firebase._inForeground = true; |
| 294 | Firebase._appDidLaunch = true; |
| 295 | }); |
| 296 | |
| 297 | Application.on('suspend', (args) => { |
| 298 | Firebase._inForeground = false; |
| 299 | }); |
| 300 | return firebaseInstance; |
| 301 | } |
| 302 | app(name?: string) { |
| 303 | if (name) { |
| 304 | if (firebaseApps.has(name)) { |