コード例 #1
0
        public async void initial_boot()
        {
            setinitialsettings();
            if (SettingsHelper.HasKey("abrirserver"))
            {
                if (SettingsHelper.GetSetting("abrirserver") == "si")
                {
                    if (serviciostreaming.gettearinstancia() != null)
                    {
                        StopService(new Intent(this, typeof(serviciostreaming)));
                        StartService(new Intent(this, typeof(serviciostreaming)));
                    }
                    else
                    {
                        StartService(new Intent(this, typeof(serviciostreaming)));
                    }
                }
            }
            if (!File.Exists(Constants.CachePath + "/verified"))
            {
                if (MultiHelper.HasInternetConnection())
                {
                    string serial = StringsHelper.GenerateSerial();
                    if (Constants.UseFirebase)
                    {
                        var firebase = new FirebaseClient(Constants.FirebaseSuggestionsUrl);
                        await firebase.Child("Descargas").Child(serial).PutAsync("Descargada@" + Android.OS.Build.Model + "@" + System.DateTime.Now);
                    }
                    var arch = File.CreateText(Constants.CachePath + "/verified");
                    arch.Write(serial);
                    arch.Close();
                }
            }

            checkedpremissions = true;
        }