Beispiel #1
0
 protected virtual void InitializeFirstChance()
 {
     ((MvxSetup)this).InitializeFirstChance();
     MvvmCrossHelper.IsRunning = true;
     Mvx.get_IoCProvider().RegisterType <IDeviceSpecification, DeviceSpecification>();
     Mvx.get_IoCProvider().RegisterType <IPushNotificationPlatformSpecificService, PushNotificationPlatformSpecificService>();
     Mvx.get_IoCProvider().RegisterSingleton <IMessaging>((Func <M0>)(() => CrossMessaging.get_Current()));
     Mvx.get_IoCProvider().RegisterSingleton <IDeviceInfo>((Func <M0>)(() => CrossDeviceInfo.get_Current()));
     Mvx.get_IoCProvider().RegisterType <IFirebaseAnalytics, eKreta.Mobile.Droid.Platform.FirebaseAnalytics.FirebaseAnalytics>();
     Mvx.get_IoCProvider().RegisterType <IFirebaseRemoteConfigurationService, FirebaseRemoteConfigurationService>();
     Mvx.get_IoCProvider().RegisterSingleton <IUserDialogs>((Func <M0>)(() => Acr.UserDialogs.UserDialogs.get_Instance()));
     Acr.UserDialogs.UserDialogs.Init((Func <Activity>)(() => ((IMvxAndroidCurrentTopActivity)Mvx.get_IoCProvider().Resolve <IMvxAndroidCurrentTopActivity>()).get_Activity()));
     ImageCircleRenderer.Init();
     ServicePointManager.ServerCertificateValidationCallback += (RemoteCertificateValidationCallback)((sender, certificate, chain, sslPolicyErrors) => true);
     AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(this.CurrentDomain_UnhandledException);
 }
Beispiel #2
0
 private string PutExtraContent(string content, Profile profile, bool sensitiveData)
 {
     try
     {
         string newValue = CrossVersionTracking.get_Current().get_CurrentVersion() + "." + CrossVersionTracking.get_Current().get_CurrentBuild();
         content = content.Replace("[version]", newValue);
         content = content.Replace("[os]", string.Format("{0} {1}", (object)CrossDeviceInfo.get_Current().get_Platform(), (object)CrossDeviceInfo.get_Current().get_Version()));
         content = content.Replace("[device]", CrossDeviceInfo.get_Current().get_Manufacturer() + " " + CrossDeviceInfo.get_Current().get_DeviceName() + " ");
         if (sensitiveData)
         {
             content = content.Replace("[name]", profile.Student.DisplayName);
             content = content.Replace("[institution]", profile.Institute.Name);
             content = content.Replace("[instituteCode]", profile.Student.InstituteCode);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(content);
 }