Exemple #1
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = null;

            try
            {
                view = inflater.Inflate(Resource.Layout.fragment_home, container, false);

                InitializeViews(view);

                CrashManager.Register(Activity);
                MetricsManager.Register(Activity, Activity.Application);

                HomeActivity homeActivity = (HomeActivity)Activity;

                if (homeActivity.firstOpen)
                {
                    RequestProfile(true);
                    homeActivity.firstOpen = false;
                }
                else
                {
                    RequestProfile(false);
                }
            }
            catch (Exception exception)
            {
                InsightsUtils.LogException(exception);
            }

            return(view);
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.SetTheme(Resource.Style.MainTheme);
            base.OnCreate(bundle);

            if (App.Instance != null)
            {
                LoadApplication(App.Instance);
            }
            else
            {
                TabLayoutResource = Resource.Layout.Tabbar;
                ToolbarResource   = Resource.Layout.Toolbar;

                InitDependenciesBeforeLibraries();

                Forms.SetFlags("FastRenderers_Experimental");
                global::Xamarin.Forms.Forms.Init(this, bundle);

                InitDependenciesAfterLibraries();
                RegisterDependencies();

                CrashManager.Register(this, AppConstants.IdHockeyAppAndroid, new XpinnCrashManagerListener());
                MetricsManager.Register(Application, AppConstants.IdHockeyAppAndroid);

                LoadApplication(new App());
            }

            FirebasePushNotificationManager.ProcessIntent(Intent);

            CheckForUpdates();
        }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.tabs;
            ToolbarResource   = Resource.Layout.toolbar;
//#if DEBUG
//      StrictMode.SetThreadPolicy(new StrictMode.ThreadPolicy.Builder().DetectAll().PenaltyLog().Build());
//      StrictMode.SetVmPolicy(new StrictMode.VmPolicy.Builder().DetectLeakedSqlLiteObjects().DetectLeakedClosableObjects().PenaltyLog().PenaltyDeath().Build());
//#endif
            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            var cv       = typeof(Xamarin.Forms.CarouselView);
            var assembly = Assembly.Load(cv.FullName);

            LoadApplication(new Forms.App(new AndroidInitializer()));

            CrashManager.Register(this);
            MetricsManager.Register(Application);

            switch (Device.Idiom)
            {
            case TargetIdiom.Phone:
                RequestedOrientation = ScreenOrientation.Portrait;
                break;

            case TargetIdiom.Tablet:
                RequestedOrientation = ScreenOrientation.User;
                break;
            }

            CheckForUpdates();
        }
Exemple #4
0
 /// <summary>
 /// Initalize the hockey application crashes tracing
 /// </summary>
 public void InitHockeyInsights()
 {
     //instantiate the hockey application for crashes reporting
     CrashManager.Register(this, _hockeyAppId);
     MetricsManager.Register(this, this, _hockeyAppId);
     MetricsManager.EnableUserMetrics(); //metrics for user activities
 }
Exemple #5
0
        public static void HockeyAppRegister(Context context)
        {
            string HOCKEYAPP_APPID = "2cc7cd8bfee64eccba506378485ce46f";

            CrashManager.Register(context, HOCKEYAPP_APPID);
            MetricsManager.Register(((Activity)context).Application, HOCKEYAPP_APPID);
        }
Exemple #6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            startButton = FindViewById <Button>(Resource.Id.startButton);

            startButton.Click += delegate {
                StartService(new Intent(this, typeof(CollectService)));
                HockeyApp.MetricsManager.TrackEvent("Click button to start to collect data");
                Toast.MakeText(this, startButton.Text, ToastLength.Short).Show();

                SetUIState();
            };

            stopButton = FindViewById <Button>(Resource.Id.stopButton);

            stopButton.Click += delegate
            {
                StopService(new Intent(this, typeof(CollectService)));
                HockeyApp.MetricsManager.TrackEvent("Click button to stop collecting");
                Toast.MakeText(this, stopButton.Text, ToastLength.Short).Show();

                SetUIState();
            };

            SetUIState();

            CrashManager.Register(this, "9a8084607e66447184a693b8c8775734");
            MetricsManager.Register(Application, "9a8084607e66447184a693b8c8775734");
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Register the crash manager before Initializing the trace writer
            CrashManager.Register(this, HOCKEYAPP_APPID);

            // Register to with the Update Manager
            UpdateManager.Register(this, HOCKEYAPP_APPID);

            // Register MetricsManager to be able to use the Metrics Feature.
            MetricsManager.Register(Application, HOCKEYAPP_APPID);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            FindViewById <Button> (Resource.Id.buttonShowFeedback).Click += delegate {
                //Register with the feedback manager
                FeedbackManager.Register(this, HOCKEYAPP_APPID, null);

                //Show the feedback screen
                FeedbackManager.ShowFeedbackActivity(this);
            };

            FindViewById <Button>(Resource.Id.buttonCauseCrash).Click += delegate {
                // Throw a deliberate sample crash
                throw new HockeyAppSampleException("You intentionally caused a crash!");
            };

            FindViewById <Button>(Resource.Id.buttonTrackEvent).Click += delegate
            {
                MetricsManager.TrackEvent("My custom event.");
            };
        }
Exemple #8
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //HockeyApp Registration
            CrashManager.Register(this, "c901aab98d2a42e0bba6fdd06be0c89f");
            MetricsManager.Register(Application, "c901aab98d2a42e0bba6fdd06be0c89f");

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            SetContentView(Resource.Layout.Main);

            _toolbar        = FindViewById <Toolbar>(Resource.Id.toolbar);
            DrawerLayout    = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            _navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            //Coupling Toolbar and Drawer
            _toolbar.SetTitle(Resource.String.Empty);
            SetSupportActionBar(_toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);

            _navigationView.NavigationItemSelected += _navigationView_NavigationItemSelected;
            _navigationView.SetCheckedItem(Resource.Id.nav_home);

            //Animating Hamburger Icon.
            _drawerToggle = setupDrawerToggle();
            DrawerLayout.AddDrawerListener(_drawerToggle);
        }
Exemple #9
0
 void InitializeHockeyApp(string hockeyAppID)
 {
     CrashManager.Register(this, hockeyAppID);
     UpdateManager.Register(this, hockeyAppID, true);
     FeedbackManager.Register(this, hockeyAppID, null);
     MetricsManager.Register(Application);
 }
        public void Init()
        {
#if !DEBUG
            CrashManager.Register(_context, Secrets.AndroidHockeyId, new HockeyListener());
            MetricsManager.Register(_app, Secrets.AndroidHockeyId);
            MetricsManager.EnableUserMetrics();
#endif
        }
        static void configureHockeyApp(Context context, Application application)
        {
            CrashManager.Register(context, PrivateKeys.HockeyApiKey_Droid);

            // UpdateManager.Register(this, PrivateKeys.HockeyApiKey_Droid);

            MetricsManager.Register(context, application, PrivateKeys.HockeyApiKey_Droid);
        }
Exemple #12
0
        protected override void OnResume()
        {
            base.OnResume();

            // Code for HockeyApp
            CrashManager.Register(this);
            HockeyLog.LogLevel = 3;
            MetricsManager.Register(Application);
        }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            MetricsManager.Register(Application, "a11b309001cc42e59c0a9f4959ee013e");

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Exemple #14
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            MetricsManager.Register(Application, "bb03a18ffefc47a8936d06961ceaa6d1");
            CheckForUpdates();
            Button button = FindViewById <Button>(Resource.Id.button);

            button.Click += Button_Click;
        }
Exemple #15
0
        private void RegisterHockeyApp()
        {
            HockeyLog.LogLevel = 3;

            // Register the crash manager before Initializing the trace writer
            CrashManager.Register(this, HOCKEYAPP_APPID);

            //Register to with the Update Manager
            UpdateManager.Register(this, HOCKEYAPP_APPID);

            MetricsManager.Register(Application, HOCKEYAPP_APPID);
        }
Exemple #16
0
        // https://components.xamarin.com/view/hockeyappios
        void InitializeHockeyApp()
        {
            if (string.IsNullOrWhiteSpace(ApiKeys.HockeyAppAndroid) || ApiKeys.HockeyAppAndroid == nameof(ApiKeys.HockeyAppAndroid))
            {
                return;
            }

            CrashManager.Register(this, ApiKeys.HockeyAppAndroid);
            UpdateManager.Register(this, ApiKeys.HockeyAppAndroid);

            MetricsManager.Register(Application, ApiKeys.HockeyAppAndroid);
        }
Exemple #17
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());

            MetricsManager.Register(Application, "4d2b087d950f45b393dfbfda7f2fa57e");
            //MetricsManager.Register(Application);//, $"${this.Application.PackageName}");
        }
Exemple #18
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());

            MetricsManager.Register(Application, Settings.HockeyAppIdAndroid);
            App.PlatformParameters = new PlatformParameters(Xamarin.Forms.Forms.Context as Activity);
        }
Exemple #19
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.tabs;
            ToolbarResource   = Resource.Layout.toolbar;

            base.OnCreate(bundle);
            CrashManager.Register(this, ChefsForSeniors.Services.Constants.Droid_HockeyApp_AppId);
            MetricsManager.Register(Application, ChefsForSeniors.Services.Constants.Droid_HockeyApp_AppId);
            UpdateManager.Register(this, ChefsForSeniors.Services.Constants.Droid_HockeyApp_AppId);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App(new AndroidInitializer()));
        }
Exemple #20
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            CrashManager.Register(this, "ca667a4805c04e738d2cf10d2fabf9d7");
            MetricsManager.Register(Application, "ca667a4805c04e738d2cf10d2fabf9d7");

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Exemple #21
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            #region HockeyApp

            CrashManager.Register(this, HockeyAppId);
            // in your main activity OnCreate-method add:
            MetricsManager.Register(Application, HockeyAppId);

            HockeyCheckUpdates();

            #endregion

            #region Insights

            Insights.Initialize("416420e0a779226dd8a0b72004d24af465e6a844", this);
            Insights.ForceDataTransmission = true;

            #endregion

            #region Azure

            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            //sqlite db
            AzureService.DbPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), AzureService.DbPath);
            if (!File.Exists(AzureService.DbPath))
            {
                File.Create(AzureService.DbPath).Dispose();
            }

            #endregion

#if ENABLE_TEST_CLOUD
            Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>
            {
                if (string.IsNullOrEmpty(e.View.StyleId))
                {
                    e.NativeView.ContentDescription = e.View.StyleId;
                }
            };
#endif

            global::Xamarin.Forms.Forms.Init(this, bundle);
            ImageCircleRenderer.Init();

            LoadApplication(new App());
        }
Exemple #22
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            CrashManager.Register(this, "21d237e64379458aa960e50d0bc15cb0");
            MetricsManager.Register(this, Application, "21d237e64379458aa960e50d0bc15cb0");
            UserDialogs.Init(this);
            CheckForUpdates();

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

            LoadApplication(new App());
        }
        public void Configure(string identifier, string version, bool activateTelemetry, bool activateMetrics, bool activateCrashReports)
        {
            this.identifier = identifier;
            if (activateCrashReports)
            {
                CrashManager.Register(context, this.identifier);
            }
            if (activateMetrics)
            {
                MetricsManager.Register(this.application, this.identifier);
            }

            isConfigured = true;
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.PhasesMenuView);
     phaseListView            = FindViewById <ListView>(Resource.Id.PhasesListView);
     phaseDataService         = new PhaseDataService();
     allPhases                = phaseDataService.GetAllPhases();
     phaseListView.Adapter    = new PhaseListAdapter(this, allPhases);
     phaseListView.ItemClick += OnListItemClick;
     //todo: add app id to app.config
     CrashManager.Register(this, "cf7c46caa58a445b8bb574dfb34deea6");
     MetricsManager.Register(Application, "cf7c46caa58a445b8bb574dfb34deea6");
     MobileCenter.Start("030463a0-0a5d-489f-aaf6-5a87474e2cbd", typeof(Analytics), typeof(Crashes));
 }
Exemple #25
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            //HockeyApp.net adresinden aldığımız HockeyApp ID'sini ilk önce aşağıdaki belirtilen yerlere yerleştireceğiz.
            CrashManager.Register(this, "BURAYA HOCKEY APPID'İNİZ GELECEK");
            MetricsManager.Register(Application, "BURAYA HOCKEY APPID'İNİZ GELECEK");

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            CrashManager.Register(this, AppId);
            MetricsManager.Register(Application, AppId);

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
            CheckForUpdates();
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            CrashManager.Register(this, "cacea18fe19f4de585de1b122e48aaee");
            MetricsManager.Register(this, Application, "cacea18fe19f4de585de1b122e48aaee");

            SetContentView(Resource.Layout.Main);
            DBManager.Static.Init(new DBConnection());
            checkLogin();
            setupViews();
            localize();
            getRecentSearches();
            assignEvents();
        }
Exemple #28
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // To learn more about HockeyApp integration on Xamarin.Android, read
            // https://support.hockeyapp.net/kb/client-integration-cross-platform/how-to-integrate-hockeyapp-with-xamarin
            CrashManager.Register(this, Settings.HockeyAppId);

            MetricsManager.Register(Application, Settings.HockeyAppId);
            MetricsManager.EnableUserMetrics();

            Forms.Init(this, bundle);

            LoadApplication(new App());
        }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            CrashManager.Register(this, AppId);

            // in your main activity OnCreate-method add:
            MetricsManager.Register(Application, AppId);

            Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Exemple #30
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            CrashManager.Register(this, UserSettings.HockeyAppId);

            MetricsManager.Register(Application, UserSettings.HockeyAppId);
            MetricsManager.EnableUserMetrics();

            global::Xamarin.Forms.Forms.Init(this, bundle);
            App.Init(this);
            LoadApplication(new PITCSurveyApp.App());
        }