// When the app starts, check to make sure that we have // the required dependencies to use Firebase, and if not, // add them if possible. void Start() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { // This should never happen if we're only using Firebase Analytics. // It does not rely on any external dependencies. Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } EventManager.StartListening <BasicEvent> (Constants.ON_SEND_DATA_TO_DATABASE, OnSendDataToDatabase); }
// When the app starts, check to make sure that we have // the required dependencies to use Firebase, and if not, // add them if possible. private void Start() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } //Set up brainCloud _bc = gameObject.AddComponent <BrainCloudWrapper>(); _bc.Init(); _bc.AlwaysAllowProfileSwitch = true; }
void InitFireBase() { _dependencyStatus = FirebaseApp.CheckDependencies(); if (_dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { _dependencyStatus = FirebaseApp.CheckDependencies(); if (_dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError("Could not resolve all Firebase dependencies: " + _dependencyStatus); } }); } else { InitializeFirebase(); } FirebaseAnalytics.LogEvent(FirebaseAnalytics.EventLogin); }
// When the app starts, check to make sure that we have // the required dependencies to use Firebase, and if not, // add them if possible. void Start() { // ObjectSpawner spawner = GetComponent<ObjectSpawner>(); dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } loadDatabaseUniqueGameObjectsOnce(); }
void Start() { ArialFont = (Font)Resources.GetBuiltinResource(typeof(Font), "Arial.ttf"); dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } }
// When the app starts, check to make sure that we have // the required dependencies to use Firebase, and if not, // add them if possible. void Start() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { // This should never happen if we're only using Firebase Analytics. // It does not rely on any external dependencies. Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } }
private void InitializeFirebase() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { Log("Firebase dependencies not ready.. asynchronously fixing.."); FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { Debug.LogError("Could not resolve all Firebase dependencies: " + dependencyStatus); } else { OnInitializationComplete(); } }); } else { OnInitializationComplete(); } }
void Start() { ScreenController.Instance.StartLoadingScreen(delegate() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { ScreenController.Instance.StopLoadingScreen(); Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } }); }
// Use this for initialization void Start() { if (PlayerPrefs.GetInt(Constants.IsLogin) == 0) { PlayerPrefs.SetInt(Constants.IsLogin, 1); PlayerPrefs.SetString(Constants.IsLoginEmailorPhone, Constants.ParentEmail); PlayerPrefs.SetString(Constants.IsLoginpassword, Constants.ParentPassword); } else { Constants.ParentEmail = PlayerPrefs.GetString(Constants.IsLoginEmailorPhone); Constants.ParentPassword = PlayerPrefs.GetString(Constants.IsLoginpassword); } dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } }
// When the app starts, check to make sure that we have // the required dependencies to use Firebase, and if not, // add them if possible. void Start() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { // This should never happen if we're only using Firebase Analytics. // It does not rely on any external dependencies. Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } var appBucket = FirebaseApp.DefaultInstance.Options.StorageBucket; if (!String.IsNullOrEmpty(appBucket)) { MyStorageBucket = String.Format("gs://{0}/", appBucket); } // Set Remote storage pathfile firebaseStorageLocation = MyStorageBucket + '/' + Constants.JSON_FILE; // Wait to get data from Remote storage (FireBase) Invoke("DownloadRemoteData", .3f); }
public void initFirebase(System.Action callbackWhenDone) { if (!initiated) { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { initiated = true; _initFirebase(callbackWhenDone); } else { // This should never happen if we're only using Firebase Analytics. // It does not rely on any external dependencies. Debug.LogError( "Could -- not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { _initFirebase(callbackWhenDone); } } else { callbackWhenDone(); } }
private FirebaseApp GetAppSynchronous() { Debug.LogWarning("You are getting the FirebaseApp synchronously. You cannot resolve dependencies this way"); if (FirebaseApp.CheckDependencies() != DependencyStatus.Available) { throw new Exception($"Firebase not available with {FirebaseApp.CheckDependencies()}"); } return(FirebaseApp.DefaultInstance); }
private static void Setup() { var dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == Firebase.DependencyStatus.Available) { Debug.Log("Firebase is ready to use"); // Create and hold a reference to your FirebaseApp, // where app is a Firebase.FirebaseApp property of your application class. //App = FirebaseApp.DefaultInstance; //DatabaseApp = FirebaseDatabase.DefaultInstance; DatabaseReference = FirebaseDatabase.DefaultInstance.RootReference; //Debug.Log("onFirebaseLoaded.Invoke();"); //Debug.Log(onFirebaseLoaded.GetPersistentMethodName(0)); //onFirebaseLoaded.Invoke(); //Invoke("InvokeInMainThread", 0.2f); } else { Debug.LogError(System.String.Format( "Could not resolve all Firebase dependencies: {0}", dependencyStatus)); // Firebase Unity SDK is not safe to use here. } /* * FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => { * var dependencyStatus = task.Result; * if (dependencyStatus == Firebase.DependencyStatus.Available) * { * Debug.Log("Firebase is ready to use"); * // Create and hold a reference to your FirebaseApp, * // where app is a Firebase.FirebaseApp property of your application class. * * //App = FirebaseApp.DefaultInstance; * //DatabaseApp = FirebaseDatabase.DefaultInstance; * DatabaseReference = FirebaseDatabase.DefaultInstance.RootReference; * * //Debug.Log("onFirebaseLoaded.Invoke();"); * //Debug.Log(onFirebaseLoaded.GetPersistentMethodName(0)); * //onFirebaseLoaded.Invoke(); * Invoke("InvokeInMainThread", 0.1f); * } * else * { * Debug.LogError(System.String.Format( * "Could not resolve all Firebase dependencies: {0}", dependencyStatus)); * // Firebase Unity SDK is not safe to use here. * } * }); */ }
void Start() { PlayerPrefs.SetString("SchoolLogin", "false"); TouchScreenKeyboard.hideInput = true; IsGalleryFrom = false; if (PlayerPrefs.GetInt(Constants.IsLogin) == 0) { PlayerPrefs.SetInt(Constants.IsLogin, 1); PlayerPrefs.SetString(Constants.IsLoginEmailorPhone, Constants.ParentEmail); PlayerPrefs.SetString(Constants.IsLoginpassword, Constants.ParentPassword); } else { Constants.ParentEmail = PlayerPrefs.GetString(Constants.IsLoginEmailorPhone); Constants.ParentPassword = PlayerPrefs.GetString(Constants.IsLoginpassword); } parentEmailInput.text = Constants.ParentEmail; parentPasswordInput.text = Constants.ParentPassword; SAGAndroidPlugin.getInstance().imageDelegate += imageHandle; parentEmailInput.enabled = false; parentPasswordInput.enabled = false; parentPhoneInput.enabled = false; dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } }
private void StartFirebase() { //Task<DependencyStatus> dependencyStatusTask = FirebaseApp.CheckDependenciesAsync(); //dependencyStatus = dependencyStatusTask.Result; //FirebaseApp.CheckDependenciesAsync().ContinueWith(task => //{ dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { StartCoroutine(InitializeDatabase()); //Debug.Log("ilkinde oldu"); // ActionManager.Instance.LoadingPanelSelfDestruction(3f); } else if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { //dependencyStatusTask = FirebaseApp.CheckDependenciesAsync(); //dependencyStatus = dependencyStatusTask.Result; Debug.Log("ilkinde olmadı, buraya geldi"); dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { Debug.Log("Gelmiyor"); StartCoroutine(InitializeDatabase()); // ActionManager.Instance.LoadingPanelSelfDestruction(3f); } else { Debug.LogError("Database`e ulaşılamadı"); } }); } //}); }
// When the app starts, check to make sure that we have // the required dependencies to use Firebase, and if not, // add them if possible. void Start() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } var appBucket = FirebaseApp.DefaultInstance.Options.StorageBucket; if (!String.IsNullOrEmpty(appBucket)) { MyStorageBucket = String.Format("gs://{0}/", appBucket); } }
public void Init(Action completion) { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { if (NumberOpens > 2) { Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived; Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived; } else { NumberOpens++; } if (completion != null) { completion.Invoke(); } } else { Debug.LogError("Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { if (completion != null) { completion.Invoke(); } } }
// When the app starts, check to make sure that we have // the required dependencies to use Firebase, and if not, // add them if possible. void Start() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } }
public void init(Action <string> onFailInitializeFirebase, Action initializeFirebase) { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { initializeFirebase(); } else { onFailInitializeFirebase("Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { initializeFirebase(); } }
// When the app starts, check to make sure that we have // the required dependencies to use Firebase, and if not, // add them if possible. void Start() { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { // This should never happen if we're only using Firebase Analytics. // It does not rely on any external dependencies. Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } var appBucket = FirebaseApp.DefaultInstance.Options.StorageBucket; if (!String.IsNullOrEmpty(appBucket)) { MyStorageBucket = String.Format("gs://{0}/", appBucket); } }
"u", "v", "w", "x", "y", "z" };//variables del codigo a asignar por aplicacion void Start() { if (PlayerPrefs.HasKey("Id"))//ver si existe la variable id guardada en el celular { } else { Code();//Generar codigo } dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus != DependencyStatus.Available) { FirebaseApp.FixDependenciesAsync().ContinueWith(task => { dependencyStatus = FirebaseApp.CheckDependencies(); if (dependencyStatus == DependencyStatus.Available) { InitializeFirebase(); } else { Debug.LogError( "Could not resolve all Firebase dependencies: " + dependencyStatus); } }); } else { InitializeFirebase(); } // Set these values before calling into the realtime database. FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://directorio-5030a.firebaseio.com/"); // Get the root reference location of the database. reference = FirebaseDatabase.DefaultInstance.RootReference; FirebaseAnalytics.LogEvent("begin_app", "percent", 1); }