Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8648145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:14:47+00:00 2026-06-12T13:14:47+00:00

When you do startActivity() with chooser, Android would list all apps entitled to handle

  • 0

When you do startActivity() with chooser, Android would list all apps entitled to handle your Intent along with options to set this assignment permanent or once-time (on ICS its Always and Just once action button, on 2.x it’s a checkbox). However for this code:

public class Redirector {
    public static void showActivityWithChooser( Context context, int chooserLabelTitleId, Intent intent ) {
      try {
        context.startActivity( Intent.createChooser( intent, 
                     context.getResources().getString( chooserLabelTitleId )) );
      } catch( Exception e ) {
        e.printStackTrace();
      }
    }

    public static void viewInExternalApplication( Context context, String url ) {
      Intent intent = new Intent(   Intent.ACTION_VIEW );
      intent.setData( Uri.parse( url ) );
      intent.addFlags( Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET );
      showActivityWithChooser( context, R.string.open_chooser_title, intent );
    }
}

I see no Always | Just once buttons and cannot make my selection permanent. What elementary I overlooked that made Android unable to make user choice persistent?

See the pics: left dialog is what I’d like to see, but right is what I get now (different number of applications in both dialogs is irrelevant):

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:14:49+00:00Added an answer on June 12, 2026 at 1:14 pm

    For a record – it was over-interpretation type of bug (of mine). The chooser I was using is exactly what can be seen on the image on the right side. And it was showing up all the time because… I was calling it all the time. I incorrectly assumed that chooser offers Always | Just once functionality and would not show up if user tapped "Always" (and will show up if s/he used Just once). But it is wrong. Chooser will always show up because that’s its role – to let user choose.

    The Always | Just once functionality is different thing -> it is a feature of the Android framework for startActivity() (and startActivityForResult() etc) and it would show up automatically when needed (when there’s more than one app, or precisely, more than one matching intent-filter declared in app manifest, that matches certain Intent). It would not show up if you got just one (or if user already choose Always).

    So you, as developer do not need to care nor handle the case in any special way. To fix the issue I simply changed my viewInExternalApplication() code to just call startActivity():

    try {
      context.startActivity( intent );
    } catch (.... )
    

    and let the framework do the rest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

public void openOptions() { Intent intent=new Intent(this,Game.class); //intent.putExtra(razmer, level); startActivity(intent); // Intent intent=new Intent(this,Options.class);
Intent intent=new Intent(this,Game.class); intent.putExtra(razmer, level); startActivity(intent); method startActivity() call constuctor class.This method creat object
I know that call system camera is Intent intent = new Intent(); intent.setAction(android.media.action.STILL_IMAGE_CAMERA); startActivity(intent);
I'm trying to start an Intent for a navigation: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(google.navigation:q= + item.getPoint().getLatitudeE6()/1E6
Can someone tell if why when starting an activity with startActivity(intent) , calling getParent()
If I launch Activity2 from Activity1 by this way: startActivity(Activity2); what executes first: onStop()
Normally, if I want to start a new activity I can use StartActivity(typeof(foo)); This
I'm triying to start whatsapp with an android intent: String uri = smsto:+123456; Intent
i am developing android app to get direction between 2 location, as below Intent
startActivity(new Intent(Settings.ACTION_SETTINGS)); Above code is used to call a setting through Intent i need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.