Questions tagged [android-intent-chooser]

An Intent to choose from different app options to resolve your request.

Example of usage:

Intent intent = new Intent(Intent.ACTION_SEND);

// Always use string resources for UI text.
// This says something like "Share this photo with"
String title = getResources().getString(R.string.chooser_title);
// Create intent to show chooser
Intent chooser = Intent.createChooser(intent, title);

// Verify the intent will resolve to at least one activity
if (intent.resolveActivity(getPackageManager()) != null) {
    startActivity(chooser);
}

Reference to Android page

111 questions
0
votes
0 answers

Open a downloaded ZIP file from Android notification

I have a WebView that is downloading a ZIP file to the device and displaying a notification to the user. My emulator has a Files app that can open the file, but the user should be able to tap the notification and open the file. Ideally, the Files…
0
votes
0 answers

Android automatically show route from my location to given location in any map application

I want to show a chooser dialog and users will choose any map app in their device. After choosing, app will automatically find device location and show route to given location(as latitude and longitude). For Google Maps, this code makes what I need…
0
votes
1 answer

When starting an intent chooser for email, how to get rid of the suggested receivers?

To start an intent chooser for email, I followed the document.https://developer.android.com/guide/components/intents-common#Email I used ACTION_SENDTO as action. The result is shown in the screenshot. Besides the possible apps to open this, there…
ljzhanglc
  • 507
  • 2
  • 8
  • 11
0
votes
1 answer

How to Show Gallery Option by Intent.ACTION_ATTACH_DATA on Xiaomi Redmi 5 Device?

My application shows a picture and then set it as wallpaper device. I have code and already try it on some devices and running successfully. (Lenovo Vibe C Lolipop, Advan I7 Marshmallow) But I found a problem on device Xiaomi Redmmi 5 (Nougat) When…
danangmr
  • 21
  • 3
0
votes
1 answer

How to forbid the file chooser to open the last used path?

I'm trying to use the file chooser of intent in my Android application. Running the application, the file chooser just opens in the last used folder of the device and not in the prespecified folder. How can i make the file chooser open in the…
0
votes
0 answers

Maintain files selection using Intent.createChooser

I'm using following code to select one or more files in Android from gallery: final Intent intent = new Intent(); intent.setType("video/*"); intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE,…
CGR
  • 370
  • 1
  • 4
  • 18
0
votes
2 answers

How to add a custom option(Dowload Image) with other share options in android

Is it possible to add a custom option(For eg. Download Image) with other share option(shown in attached image) in intent chooser?
Sapna Sharma
  • 460
  • 7
  • 22
0
votes
1 answer

FileUriExposedException while downloading file from OneDrive with ChooserIntent

I use a ChooserIntent to add files to my Application. Intent intent = new…
0
votes
2 answers

Filtering chooser intent

I want to get emails from users. I am trying to filter the chooser intent but i am stuck at some point. Chooser intent brings the user's contacts. I just want to show the installed email apps, with 'to' field auto filled of course. How can I remove…
eren
  • 46
  • 6
0
votes
1 answer

Sharing intent doesn't open on certain devices

What I am using: ShareCompat.IntentBuilder .from(getActivity()) .setText("text") .setType("text/plain") .startChooser(); I also tried the below: Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); …
Roudi
  • 1,249
  • 2
  • 12
  • 26
0
votes
1 answer

How to choose any app to launch with the app chooser in Android?

The following code is essentially copied from Android document: Intent intent = new Intent(Intent.ACTION_SEND); // Create intent to show chooser Intent chooser = Intent.createChooser(intent, "Choose an app"); // Verify the intent will resolve to at…
Hong
  • 17,643
  • 21
  • 81
  • 142
0
votes
1 answer

prevent showing chooser dialog each time get user account

I need to check user account in my app and I need to check it more than once in app , I used this answer and works fine , but the problem is each time I want to get account the chooser dialog appears for " choose an account " and its not good at…
sasan
  • 111
  • 11
0
votes
0 answers

Android: How to filter apps that can share mixed contents

I am implementing share in my app. Sharing mixed content like image+text is possible with some apps like whatsapp, twitter etc. while facebook, linkedin etc. only allow content of one type(either image or text). How can this be achieved? E.g when…
Nitish
  • 3,097
  • 13
  • 45
  • 80
0
votes
4 answers

pass jsonarray from Activity A to Activity B?

I have two Activity A and B.I call API in Activity A and get response in JsonArray. Now I need to get Whole JsonArray in Activity B from Activity A.how can I do this?
0
votes
2 answers

Android Intent Chooser

I am creating an app in which there is a Gmail button and when user when clicks on Gmail it sends a mail to the particular receipient using inbuilt gmail client but what happens is when the user clicks on gmail button ,it opens a list of all the…
neha
  • 107
  • 2
  • 11