Ejemplo n.º 1
0
        protected override void OnStart()
        {
            base.OnStart();

            Android.Content.Context ctx = this;

            if (_firstStart)
            {
                CheckAndRequestAppReview();

                TutorialDialog.ShowTutorial(this, TutorialPart.MainActivity,
                                            new TutorialPage[]
                {
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_compass_calibration, textResourceId = Resource.String.Tutorial_Main_CompassCalibration
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_heading_correction, textResourceId = Resource.String.Tutorial_Main_HeadingCorrection
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_horizont_correction_simple, textResourceId = Resource.String.Tutorial_Main_HorizontCorrection
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_show_poi_data, textResourceId = Resource.String.Tutorial_Main_ShowPoiData
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_ar_warning, textResourceId = Resource.String.Tutorial_Main_ARWarning
                    },
                },
                                            () =>
                {
                    _firstStart = false;
                    if (!Context.Database.IsAnyDownloadedPois())
                    {
                        AlertDialog.Builder alert = new AlertDialog.Builder(this).SetCancelable(false);
                        alert.SetPositiveButton(Resources.GetText(Resource.String.Common_Yes), (senderAlert, args) =>
                        {
                            Intent downloadActivityIntent = new Intent(ctx, typeof(DownloadActivity));
                            StartActivity(downloadActivityIntent);
                            //_adapter.NotifyDataSetChanged();
                        });
                        alert.SetNegativeButton(Resources.GetText(Resource.String.Common_No), (senderAlert, args) => { });
                        alert.SetMessage(Resources.GetText(Resource.String.Main_DownloadDataQuestion));
                        var answer = alert.Show();
                    }

                    ElevationProfileProvider.Instance().CheckAndReloadElevationProfile(this, MaxDistance, Context);
                });
            }
        }