private void ShowOverlayPermissionScreen() { var intent = new Intent(Settings.ActionManageOverlayPermission, AUri.FromParts("package", Application.Context.PackageName, null)); intent.AddFlags(ActivityFlags.NewTask); Application.Context.StartActivity(intent); }
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); }
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); }
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); }
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); }