public void PrepareApplication(BaseScreen baseActivity) { _baseActivity = baseActivity; DeviceId = Android.Provider.Settings.Secure.GetString(Android.App.Application.Context.ContentResolver , Android.Provider.Settings.Secure.AndroidId); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; _javaExceptionsHandler = new JavaExceptionHandler(); Java.Lang.Thread.DefaultUncaughtExceptionHandler = _javaExceptionsHandler; D.Init(_baseActivity.Resources.Configuration.Locale.Language); ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(_baseActivity.BaseContext); var infobases = new InfobasesScreen(_baseActivity, prefs, StartApplication); infobases.Start(); }
public void PrepareApplication(BaseScreen baseActivity) { _baseActivity = baseActivity; RootPath = baseActivity.ApplicationContext.GetExternalFilesDir(null).AbsolutePath; Temp = Path.Combine(RootPath, "Temp"); if (!Directory.Exists(RootPath)) Directory.CreateDirectory(RootPath); string nomediaPath = Path.Combine(RootPath, ".nomedia"); if (!File.Exists(nomediaPath)) File.Create(nomediaPath); DeviceId = Android.Provider.Settings.Secure.GetString(Android.App.Application.Context.ContentResolver , Android.Provider.Settings.Secure.AndroidId); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; _javaExceptionsHandler = new JavaExceptionHandler(); Java.Lang.Thread.DefaultUncaughtExceptionHandler = _javaExceptionsHandler; D.Init(BaseActivity.Resources.Configuration.Locale.Language); ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(BaseActivity.BaseContext); var infobases = new InfobasesScreen(BaseActivity, prefs, StartApplication); infobases.Start(); }