Questions tagged [android-sharing]

In Android, sharing is the action of sending data (text, images, &c) to a different application or device (often chosen from a list of available targets instead of explicitly chosen).

Sharing can generally be accomplished with Intents, or via a specialized widget called a ShareActionProvider.

Developer Guide: Building Apps with Content Sharing

315 questions
198
votes
12 answers

How to filter specific apps for ACTION_SEND intent (and set a different text for each app)

How can you filter out specific apps when using the ACTION_SEND intent? This question has been asked in various ways, but I haven't been able to gather a solution based on the answers given. Hopefully someone can help. I would like to provide the…
Kyle Clegg
  • 38,547
  • 26
  • 130
  • 141
92
votes
10 answers

Share Text on Facebook from Android App via ACTION_SEND

I have an Android app and it supports sending text via other apps. It therefore uses the ACTION_SEND intent and the EXTRA_TEXT field. The chooser presents me with all apps that can handle such an intent. Those are Twitter, Email, ... and Facebook.…
Goddchen
  • 4,459
  • 4
  • 33
  • 54
63
votes
15 answers

How to Share Image + Text together using ACTION_SEND in android?

I want to share Text + Image together using ACTION_SEND in android, I am using below code, I can share only Image but i can not share Text with it, private Uri imageUri; private Intent intent; imageUri = Uri.parse("android.resource://" +…
Hiren Patel
  • 52,124
  • 21
  • 173
  • 151
17
votes
2 answers

Image share intent works for Gmail but crashes FB and twitter

I am trying to allow the user to share an image to other apps on the device. The image is inside the files/ subdirectory of my app's internal storage area. It works just fine with Gmail, but Facebook and Twitter both crash when responding to my…
iforce2d
  • 8,194
  • 3
  • 29
  • 40
14
votes
5 answers

Share Intent of Google+ can not access image

i am calling an intent to share an image. this works with most providers, BUT with Google+. Google+ opens the post activity without the image and displays the toast "You can only post photos stored on your device." at the same time. File f =…
SimonSays
  • 10,867
  • 7
  • 44
  • 59
9
votes
3 answers

Share file uri from ACTION_PICK

im trying to make an app that will ask the user to pick a image file and then send it via intent to another app (Whatsapp in this case but this should work with other apps) Im doing this to request the file: Intent intent = new…
Nanoc
  • 2,381
  • 1
  • 20
  • 35
9
votes
2 answers

How to confirm Android Share Intent is successful or complete

Is there a way to confirm if a Share intent in Android was successful or unsuccessful? (For example, if I share a Facebook post, I'd like to know if it was successfully posted or know if it was cancelled.) Below is the Android intent code that I use…
code
  • 5,294
  • 16
  • 62
  • 113
9
votes
3 answers

Share to Facebook in android (like twitter)

As anyone who's tried to share to Facebook via Android knows, the Facebook team has decided to disregard the protocol for sharing and ignores the text provided in the share intent (see: Share Text on Facebook from Android App via…
StackOverflowed
  • 5,854
  • 9
  • 55
  • 119
8
votes
1 answer

How to share *.txt file in android

I tried many ways but I can't do this. I have a *.txt file. I want to share it via Bluetooth, wifi, email and .... When i used this code i cant share the file: File file = new File(Environment.getExternalStorageDirectory(),…
SAYE
  • 1,247
  • 2
  • 20
  • 47
8
votes
3 answers

Android share image URL with Facebook SharePhotoContent

I'm trying to share a photo using Facebook's new SharePhoto & SharePhotoContent classes in the new SDK. I'd like to use an image URL instead of a locally stored image. I am able to share an image using a locally stored drawable resource: Bitmap…
Lady_ari
  • 433
  • 3
  • 8
  • 19
8
votes
1 answer

getting exception IndexOutOfBoundsException FragmentManagerImpl after sharing something to the apps

I get this exception just after sharing content to my app and just in the case when the app is already started. If I start the app directly all the things work good. If I share something to my app and the app is not already running all the things…
Ligol
  • 448
  • 3
  • 11
8
votes
2 answers

Specifying a SEND (sharing) intent filter for a Service

I am trying to filter and handle intents with android.intent.action.SEND actions in one of my Services. I wrote the following in my AndroidManifest.xml:
7
votes
2 answers

Android : Not able to share photos on Instagram using Intent

I am not able to share any photo on Instagram feed using Intent in Android. It opens Instagram and shows "Unable to load Photo" error and comes back to my app. Intent share = new Intent(Intent.ACTION_SEND); share.setType("image/*"); …
Amit Kumar
  • 438
  • 1
  • 4
  • 15
7
votes
1 answer

Share image from URL via Twitter app - Android

I'm trying to share some text and image via the Twitter app. The image source is a web url. Below is my code: sharingIntent = new Intent(android.content.Intent.ACTION_SEND); sharingIntent.setType("*/*"); …
Sourav
  • 1,214
  • 14
  • 24
7
votes
3 answers

Android sharing image doesn't work

I am trying to share a screenshot of the application using the following code: View content = findViewById(R.id.layoutHome); content.setDrawingCacheEnabled(true); Bitmap bitmap = content.getDrawingCache(); File sdCardDirectory =…
buczek
  • 2,011
  • 7
  • 29
  • 40
1
2 3
20 21