示例#1
0
        private void ShowOverlayPermissionScreen()
        {
            var intent = new Intent(Settings.ActionManageOverlayPermission, AUri.FromParts("package", Application.Context.PackageName, null));

            intent.AddFlags(ActivityFlags.NewTask);
            Application.Context.StartActivity(intent);
        }
示例#2
0
        public void OpenAppSettings()
        {
            var intent = new Intent(Settings.ActionApplicationDetailsSettings);

            intent.AddFlags(ActivityFlags.NewTask);
            var uri = Uri.FromParts("package", FormsActivity.AppPackageName, null);

            intent.SetData(uri);
            Application.Context.StartActivity(intent);
        }
示例#3
0
        public static void GoToAppSettings(this Context context)
        {
            var intent = new Intent(Settings.ActionApplicationDetailsSettings);

            intent.AddFlags(ActivityFlags.NewTask);
            var uri = Uri.FromParts("package", context.PackageName, null);

            intent.SetData(uri);
            context.StartActivity(intent);
        }
示例#4
0
            public void OnClick(View v)
            {
                Intent intent = new Intent();

                intent.SetAction(Settings.ActionApplicationDetailsSettings);
                Uri uri = Uri.FromParts("package", Activity.PackageName, null);

                intent.SetData(uri);
                intent.SetFlags(ActivityFlags.NewTask);
                Activity.StartActivity(intent);
            }
示例#5
0
        void OnMenuItemSelected(object sender, Android.Support.Design.Widget.NavigationView.NavigationItemSelectedEventArgs e)
        {
            switch (e.MenuItem.ItemId)
            {
            case Resource.Id.myProfileMain:
                Intent userIntent = new Intent(this, typeof(MyProfileActivity));
                StartActivity(userIntent);
                break;

            case Resource.Id.myGroupMain:
                Intent groupIntent = new Intent(this, typeof(MyGroupActivity));
                StartActivity(groupIntent);
                break;

            case Resource.Id.settingsMain:
                Intent optionsIntent = new Intent(this, typeof(OptionsActivity));
                StartActivity(optionsIntent); break;

            case Resource.Id.feedbackMain:
                Intent emailIntent = new Intent(Intent.ActionSendto, Uri.FromParts("mailto", "*****@*****.**", null));
                emailIntent.PutExtra(Intent.ExtraSubject, "Feedback");
                emailIntent.PutExtra(Intent.ExtraText, "Problem/Suggestion/etc.");
                StartActivity(Intent.CreateChooser(emailIntent, "Send email..."));
                break;

            case Resource.Id.logoutMain:
                StartActivity(typeof(LoginActivity));
                Finish();
                ChamberOfSecrets.Instance.group        = new Group();
                ChamberOfSecrets.Instance.LoggedUser   = new User();
                ChamberOfSecrets.Instance.AllGroceries = new AvailableGroceries();
                break;
            }

            mainDrawerLayout.CloseDrawer(GravityCompat.Start);
        }