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
5
votes
1 answer

Proper way to get file path when it's picked using ACTION_GET_CONTENT

I have a file picker implemented in my app like this: Intent intent = new Intent(); intent.setType("*/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Title"), FILE_PICK); It's a known issue…
Guy
  • 6,414
  • 19
  • 66
  • 136
3
votes
0 answers

How to handle createChooser's IntentSender without having the component class of the receiver Intent

I am trying to handle the IntentSender of Intent.createChooser() to do something when a user selects an app to share an image on. Most the examples I've found here (posted below), require using a BroadcastReceiver as follows: Intent receiver = new…
3
votes
1 answer

startActivity with createChooser not showing chooser but starts immediately

i'm trying to provide the user with an option to find something in google play. i'm trying to use the Intent.createChooser but the chooser is not displayed, the market is just opened immediately without displaying the chooser. i searched around and…
Shay Vilk
  • 33
  • 5
3
votes
3 answers

Request Permission after selected option(either camera or gallery) from intent chooser in android

I have created an intent chooser containing Gallery, Photos and Camera apps. Now for the devices running on Android 6.0 or greater I want to ask the run time permissions after app is selected from chooser like if user selects gallery option I will…
3
votes
1 answer

Share intent takes long time to appear

I'm trying to include image sharing in my application and everything is working but the share chooser takes long time to appear on devices here is what i'm doing: I have ImageView "items_details_image" and I want to share its image to be able to…
2
votes
1 answer

Share Button In Compose

How can I make a share button in compose, which will share a download link, I tried this but the result was different that I expected. Here is the code. Button( onClick = { val intent = Intent(Intent.ACTION_SEND) …
2
votes
3 answers

Android - How to exclude PayPal from Email chooser list?

I'm using this code to open email chooser via intent val mIntent = Intent( Intent.ACTION_SENDTO, Uri.fromParts( "mailto", "name@email.com", null ) ) mIntent.putExtra(Intent.EXTRA_SUBJECT, "[Feedback - App…
Niraj
  • 903
  • 8
  • 23
2
votes
2 answers

I am creating a Browser App but Android won't detect my app in chooser while I click on any URL

I am creating a Browser app and I want Android to treat my app as a browser and show up in the app chooser to open with. I want my app to show up in this list. Here is my manifest Activity code:
Pritam Pawade
  • 637
  • 7
  • 21
2
votes
1 answer

My Android app always opens links instead of Android asking every time

My app is designed to work with various Amazon links but for some reason it has started to always open links instead of the Android system asking every time. If I click a link on the Amazon website in Chrome my app opens. If I click an Amazon link…
2
votes
1 answer

Why did `Intent.createChooser(shareIntentWithJpgFileName)` quit working?

Image File No Longer Passed Through Chooser The code startActivity(intent.createChooser(shareIntentWithJpgFileName)) had been working fine in my application for years, but I noticed about a month ago that it no longer passes the image file to the…
Dale
  • 5,520
  • 4
  • 43
  • 79
2
votes
0 answers

show JUST ONCE and ALWAYS option using Intent.createChooser

I open chooser dialog using Intent.createChooser() method. But in that dialog I can't see "JUST ONCE" and "ALWAYS" options. I want this type of chooser dialog with Intent.createChooser() method here is my code. File mFile = new File("give your…
2
votes
1 answer

I need an Intent to pick a video with a specific format

I need to pick photo or video from the gallery. But need to restrict video format for example only for mp4 and mov or other specific later. Can I achieve it with adding some options to this kind of code? Intent i = new…
2
votes
1 answer

Intent image share-file format not supported

I'm unable to share the image on social media when I clicked on the share button. It showed the Toast File format not supported public void onBindViewHolder(final ViewHolder holder, int position) { upload = uploads.get(position); …
Muhammad Saad
  • 713
  • 1
  • 9
  • 31
2
votes
1 answer

Android how to request permission based on user action in chooser intent

I'm having a trouble to request user permission based on what they've selected in chooser intent. For now, my program is request the permissions before the chooser intent show up. How can I achieve in a way that request the permissions after they've…
2
votes
1 answer

android intent chooser - display chooser with one option

I want to create an intent choose to show only one option (copy to clipboard), but when I do it, The intent is automatically started (copied to clipboard) and no chooser is displayed. here is my code: Intent copyToClipboard = new Intent(activity,…
roeiki11
  • 279
  • 1
  • 3
  • 12