Beispiel #1
0
        protected override async void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);



            File appDirectory = GetExternalFilesDir(null);
            File logDirectory = new File(appDirectory + "/log");
            File logFile      = new File(logDirectory + "/BBW_Inspect.Mobile_Logging_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".txt");

            if (!logDirectory.Exists())
            {
                logDirectory.Mkdir();
            }

            Java.Lang.Process process = Runtime.GetRuntime().Exec("logcat -c");
            process = Runtime.GetRuntime().Exec("logcat -f " + logFile + " -v time");

            AndroidEnvironment.UnhandledExceptionRaiser += AndroidEnvironment_UnhandledExceptionRaiser;

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            Xamarin.Forms.Forms.Init(this, bundle);

            var app = new App();

            // Register the third-party plugins
            PluginConfig.Register(app, this, bundle);
            LoadApplication(new App());
        }