Example #1
0
        private async void RefreshUserTrialStatus()
        {
            if (MSAAuthenticator.HasUserUniqueId())
            {
                var userId = await MSAAuthenticator.GetUserUniqueIdAsync();

                await TrialHelper.RefreshUserTrialStatusAsync(userId);
            }
        }
Example #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            RequestWindowFeature(WindowFeatures.NoTitle);
            base.OnCreate(savedInstanceState);

            if (MSAAuthenticator.HasUserUniqueId() || CloudServiceAuthenticationHelper.IsAuthenticatedForApiV3())
            {
                LaunchHomeScreen();
                return;
            }

            (new Classes.WhatsNew(this)).Shown(); //Don't show what's new dialog if this is the first time user opens the app.

            Instance = this;

            SetTheme(Resource.Style.MyTheme_Dark);
            Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);
            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                Window.SetNavigationBarColor(Android.Graphics.Color.Black);
                Window.DecorView.SystemUiVisibility = StatusBarVisibility.Hidden;
            }

            SetContentView(Resource.Layout.Intro);

            viewPager = FindViewById <ViewPager>(Resource.Id.intro_viewPager);
            dots      = FindViewById <TextView>(Resource.Id.intro_dotsText);
            btnNext   = FindViewById <Button>(Resource.Id.intro_btnNext);
            btnSkip   = FindViewById <Button>(Resource.Id.intro_btnSkip);

            layouts = new List <int>()
            {
                Resource.Layout.Intro1,
                Resource.Layout.Intro2,
                Resource.Layout.Intro3,
                Resource.Layout.Intro4,
                Resource.Layout.Intro4_1,
                Resource.Layout.Intro5,
            };

            AddBottomDots(0);

            introViewPagerAdapter       = new IntroViewPagerAdapter(this);
            viewPager.Adapter           = introViewPagerAdapter;
            viewPagerPageChangeListener = new ViewPagerPageChangeListener();
            viewPager.AddOnPageChangeListener(viewPagerPageChangeListener);

            OSHelper.ClearWebViewCache(ApplicationContext);

            btnNext.Click += BtnNext_Click;
            btnSkip.Click += BtnSkip_Click;
        }
Example #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            RequestWindowFeature(WindowFeatures.NoTitle);
            base.OnCreate(savedInstanceState);

            if (MSAAuthenticator.HasUserUniqueId())
            {
                LaunchHomeScreen();
                return;
            }

            (new Classes.WhatsNew(this)).Shown(); //Don't show what's new dialog if this is the first time user opens the app.

            Instance = this;

            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                Window.DecorView.SystemUiVisibility = StatusBarVisibility.Hidden;
            }

            SetContentView(Resource.Layout.Intro);

            viewPager = FindViewById <ViewPager>(Resource.Id.intro_viewPager);
            dots      = FindViewById <TextView>(Resource.Id.intro_dotsText);
            btnNext   = FindViewById <Button>(Resource.Id.intro_btnNext);
            btnSkip   = FindViewById <Button>(Resource.Id.intro_btnSkip);

            layouts = new List <int>()
            {
                Resource.Layout.Intro1,
                Resource.Layout.Intro2,
                Resource.Layout.Intro3,
                Resource.Layout.Intro4,
                Resource.Layout.Intro4_1,
                Resource.Layout.Intro5,
            };

            AddBottomDots(0);

            introViewPagerAdapter       = new IntroViewPagerAdapter(this);
            viewPager.Adapter           = introViewPagerAdapter;
            viewPagerPageChangeListener = new ViewPagerPageChangeListener();
            viewPager.AddOnPageChangeListener(viewPagerPageChangeListener);

            btnNext.Click += BtnNext_Click;
            btnSkip.Click += BtnSkip_Click;
        }