Questions tagged [share-intent]
106 questions
29
votes
12 answers
Share image and text through Whatsapp or Facebook
I have in my app a share button and i want to share an image and a text at the same time. In GMail it works fine but in WhatsApp, only the image is sent and in Facebook the app crashes.
The code i use to share is this:
Intent shareIntent = new…

user2802764
- 357
- 1
- 4
- 9
9
votes
5 answers
Share Intent text using Kotlin on Android
I want to share text in my CardView using share Intent using kotlin but there is a problem with last line in the code in kotlin
the code
val shareIntent = Intent()
shareIntent.action = Intent.ACTION_SEND
…

Ali Alsaadi
- 89
- 1
- 1
- 6
9
votes
3 answers
Android : Share intent is not working for video file path
I have a video file path and want to share the video on social media, but unable to share the video. I am trying following code in Android Studio 2.2, but it's not working.
Code snippet :
public void onCreate(Bundle savedInstanceState) {
…

SRK
- 744
- 3
- 11
- 23
7
votes
1 answer
how to send image or video to whatsapp status in android programmatically?
How to send image or video to the WhatsApp Status (or story) in android.
we can send an image to contact by using:
Intent sendIntent = new…

Akshay Rana Gujjar
- 71
- 2
- 7
6
votes
1 answer
How to Show multiple image share options of our Application like facebook?
I am creating a social media application in which user can share images, videos, audios etc. I am successful in receiving the medias that shares from third party application by adding the below code in manifest file.

Cecil Paul
- 595
- 6
- 27
5
votes
1 answer
Android Intent.ACTION_SEND from Internal Storage with Content Provider
I am saving a file on internal storage. It is just a .txt file with some information about objects:
FileOutputStream outputStream;
String filename = "file.txt";
File cacheDir = context.getCacheDir();
File outFile = new…

L3n95
- 1,505
- 3
- 25
- 49
4
votes
2 answers
Can I receive a share intent without opening my Flutter app?
I'm creating an app in Flutter to store any type of media, imagem, video, pdfs, etc. And I want to be able to receive share intents from other apps in the easiest way possible for the user.
So, my idea is to be able to simply receive the media…

GusHill
- 65
- 2
- 6
4
votes
2 answers
How to convert a view or layout to image and share using intent?
I am trying to convert a card view into image and share it through whats app.
I am using file provider as the test device's version is higher.
So when I am trying to create a file it is giving me an exception
e = {IllegalArgumentException@7727}…

Sid
- 2,792
- 9
- 55
- 111
4
votes
1 answer
Share Image with text(hashtags) as instagram story in android
I would like to share an image with few hashtags as text with them (#foodLOve, #RestaurantName etc) as my Instagram story in android. I have no issues with the image but the text I'm including is not appearing. I'm not using Facebook SDK here. Here…

Sumukha Aithal K
- 675
- 1
- 10
- 23
4
votes
0 answers
Samsung crashing on share intent
Intent share = new Intent(Intent.ACTION_SEND);
if(isVideo()){
share.setType("video/*");
} else {
share.setType("image/*");
}
share.putExtra(Intent.EXTRA_STREAM,…

TatiOverflow
- 1,071
- 2
- 16
- 23
4
votes
3 answers
Intent.ACTION_SEND not working on Oreo
I am developing a custom camera application which captures a picture and stores it in the gallery. When I share that image using Intent.ACTION_SEND, it works absolutely fine on all devices except for devices having API 26, i.e. OREO.
My code to…

Ali Haider
- 374
- 2
- 3
- 14
4
votes
1 answer
How to use the Intent from chooser as a PendingIntent
I want to use the CustomTabs library, where I need to add a share menu item. The library accepts only PendingIntent instance to be used as an Action for the menu item. I want to use the following code to make sure that the list is suggested to the…

X-HuMan
- 1,488
- 1
- 17
- 37
4
votes
0 answers
How to share text from Android Chrome with other apps?
I want a button in a webpage in Android Chrome that shows the "Share with" dialog so that a text is sent, for example, to the email app.
I have this:
Share
..but it…

Montaner
- 522
- 5
- 16
3
votes
0 answers
Is there any way to check the callback from Intent share?
I want to call an API after the post is successfully shared on Whatsapp, Facebook, etc.
below are the codes I am using to launch the apps.
Val intent = Intent(Intent.ACTION_SEND)
intent.type = "image/*"
…

Firdous
- 31
- 2
3
votes
2 answers
How to share current app's APK (or of other installed apps) using the new FileProvider?
Background
In the past, it was easy to share an APK file with any app you wanted, using a simple command:
startActivity(new Intent(Intent.ACTION_SEND,Uri.fromFile(filePath)).setType("*/*"));
The problem
If your app targets Android API 24 (Android…

android developer
- 114,585
- 152
- 739
- 1,270