firebase:: App
  
    #include <app.h>
  
Firebase application object.
Summary
firebase::App acts as a conduit for communication between all Firebase services used by an application.
For example:
#if defined(__ANDROID__) firebase::App::Create(firebase::AppOptions(), jni_env, activity); #else firebase::App::Create(firebase::AppOptions()); #endif // defined(__ANDROID__)
        Constructors and Destructors | 
    |
|---|---|
        ~App()
         | 
    
        Public functions | 
    |
|---|---|
        GetJNIEnv() const 
       | 
      
        JNIEnv *
        Get JNI environment, needed for performing JNI calls, set on creation.  
       | 
    
        activity() const 
       | 
      
        jobject
        Get a global reference to the Android activity provided to the App on creation.  
       | 
    
        java_vm() const 
       | 
      
        JavaVM *
        Get Java virtual machine, retrieved from the initial JNI environment.  
       | 
    
        name() const 
       | 
      
        const char *
        Get the name of this App instance.  
       | 
    
        options() const 
       | 
      
        const AppOptions &
        Get options the App was created with.  
       | 
    
        Public static functions | 
    |
|---|---|
        Create()
       | 
      
        App *
        Initializes the default firebase::App with default options.  
       | 
    
        Create(JNIEnv *jni_env, jobject activity)
       | 
      
        App *
        Initializes the default firebase::App with default options.  
       | 
    
        Create(const AppOptions & options)
       | 
      
        App *
        Initializes the default firebase::App with the given options.  
       | 
    
        Create(const AppOptions & options, JNIEnv *jni_env, jobject activity)
       | 
      
        App *
        Initializes the default firebase::App with the given options.  
       | 
    
        Create(const AppOptions & options, const char *name)
       | 
      
        App *
        Initializes a firebase::App with the given options that operates on the named app.  
       | 
    
        Create(const AppOptions & options, const char *name, JNIEnv *jni_env, jobject activity)
       | 
      
        App *
        Initializes a firebase::App with the given options that operates on the named app.  
       | 
    
        GetApps()
       | 
      
        std::vector< App * >
        Get all the apps, including the default one.  
       | 
    
        GetInstance()
       | 
      
        App *
        Get the default App, or nullptr if none has been created.  
       | 
    
        GetInstance(const char *name)
       | 
      
        App *
        Get the App with the given name, or nullptr if none have been created.  
       | 
    
Public functions
GetJNIEnv
JNIEnv * GetJNIEnv() const
Get JNI environment, needed for performing JNI calls, set on creation.
This is not trivial as the correct environment needs to retrieved per thread.
| Details | |
|---|---|
| Returns | 
               JNI environment object.  
             | 
          
activity
jobject activity() const
java_vm
JavaVM * java_vm() const
Get Java virtual machine, retrieved from the initial JNI environment.
| Details | |
|---|---|
| Returns | 
               JNI Java virtual machine object.  
             | 
          
name
const char * name() const
Get the name of this App instance.
| Details | |
|---|---|
| Returns | 
               The name of this App instance. If a name wasn't provided via Create(), this returns kDefaultAppName.  
             | 
          
options
const AppOptions & options() const
~App
~App()
Public static functions
Create
App * Create( JNIEnv *jni_env, jobject activity )
Initializes the default firebase::App with default options.
| Details | |||||
|---|---|---|---|---|---|
| Parameters | 
              
  | 
          ||||
| Returns | 
Create
App * Create( const AppOptions & options )
Initializes the default firebase::App with the given options.
Options are copied at initialization time, so changes to the object are ignored.
| Details | |||
|---|---|---|---|
| Parameters | 
              
  | 
          ||
| Returns | 
Create
App * Create( const AppOptions & options, JNIEnv *jni_env, jobject activity )
Initializes the default firebase::App with the given options.
Options are copied at initialization time, so changes to the object are ignored.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters | 
              
  | 
          ||||||
| Returns | 
Create
App * Create( const AppOptions & options, const char *name )
Initializes a firebase::App with the given options that operates on the named app.
Options are copied at initialization time, so changes to the object are ignored.
| Details | |||||
|---|---|---|---|---|---|
| Parameters | 
              
  | 
          ||||
| Returns | 
Create
App * Create( const AppOptions & options, const char *name, JNIEnv *jni_env, jobject activity )
Initializes a firebase::App with the given options that operates on the named app.
Options are copied at initialization time, so changes to the object are ignored.
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters | 
              
  | 
          ||||||||
| Returns |