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

How to mimic a chooser activity/share menu?

I have tried to make my own Chooser Activity to replace androids share to... popup. I took a look at ChooserActivity extends ResolverActivity and tried to copy the code. In my manifest I have
6
votes
3 answers

How to share a text link via text intent?

I want to share a text clicking on which the user will navigate to a url via android share intent. For example: "Visit google for more info." In above text, on clicking google, user will be redirected to google.com. I need to achieve something like…
Hari Krishnan
  • 5,992
  • 9
  • 37
  • 55
6
votes
1 answer

FATAL EXCEPTION: ThumbnailManager-1 while sharing images to Intent

I got following Exception while sharing images using FileProvider. Following is the code I used to. { ArrayList files = new ArrayList(); files.add(getImageUriFromCache(context,bitmap,fileName)); } private void…
6
votes
1 answer

How to share an android application with facebook and twitter button which is in this application

I developed an android application. I want to put this application buttons of facebook and twitter, and I want to share my android application when the buttons are clicked. How can I do? Thanks.
Ozturk
  • 569
  • 8
  • 20
6
votes
2 answers

What is the purpose of "FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET" when sharing?

I have read, http://developer.android.com/guide/components/tasks-and-back-stack.html and I have looked up the documentation for FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, but I still do not understand why a employee at Google decided to include it in…
EGHDK
  • 17,818
  • 45
  • 129
  • 204
5
votes
5 answers

Couln't sharing file requires the provider be exported, or grantUriPermission()

I have been trying to solve a problen with sharing image from external storage directory. it works in most of the devices, but It is not working in others. I have: 1. Added a class extending FileProvider: public class GenericFileProvider extends…
5
votes
2 answers

How to share image from link ,i.e, without downloading the image just share using a button

I am beginner in android studio and i think it will be easy but also I am not getting that How to share image from link ,i.e, without downloading the image just share on social media like whats app .I can download the image and then share and then…
Ashad Nasim
  • 2,511
  • 21
  • 37
5
votes
1 answer

How to share image + text on viber / instagram?

On Android I try to share image + text like this : Uri imageUri = Uri.parse("android.resource://" + getPackageName() + "/drawable/" + "ic_launcher"); Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); …
zeus
  • 12,173
  • 9
  • 63
  • 184
5
votes
0 answers

Direct share is not working with my app. ChooserTargetService is not called

I referred sample application code (https://github.com/googlesamples/android-DirectShare) and I added ChooserTargetService to my application public class ShareChooserTargetService extends ChooserTargetService { @Override public List
vidha
  • 1,257
  • 2
  • 14
  • 22
5
votes
1 answer

Permissions on Android M when sharing Data to other apps

It seems that sharing data to other apps on Android M is only possible when the other app has manually asked for READ_EXTERNAL_STORAGE permission, and I am wondering if anyone knows a way around this without manually opening all apps I can share to…
kandroidj
  • 13,784
  • 5
  • 64
  • 76
5
votes
2 answers

Android Sharing with Subject E-Mail/Whatsapp

I am using android native sharing with this code: Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_TEXT, "I like to share with you some stuff."); intent.putExtra(Intent.EXTRA_SUBJECT, "I like to share with…
Christopher
  • 9,682
  • 7
  • 47
  • 76
5
votes
1 answer

Add custom action to Android Share-Sheet

I have an app where the user should be able to share some text. Now I want to provide the default sharing options for plain text that Android provides. I do so with the following code: Intent sendIntent = new…
Georg
  • 3,664
  • 3
  • 34
  • 75
5
votes
1 answer

Change attachment name when sharing file to mail

I am sharing a file using this code: Uri fileUri = Uri.fromFile(new File(filePath)); Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("audio/mp3"); shareIntent.putExtra(Intent.EXTRA_SUBJECT,…
Beshoy Fayez
  • 300
  • 5
  • 10
4
votes
1 answer

How to share/send Video Data to Tik-Tok app via Intent through my app, just like gallery sharing

I need to share a video Uri to tik-tok, instagram, youtube where I am able to share to instagram and youtube by just putting Intent.EXTRA_STREAM, but this is not working for tik-tok. our gallery app can share data to tik-tok so it is damn possible…
Gopal sharma
  • 43
  • 1
  • 5
4
votes
0 answers

Whatsapp is cutting audio file when sharing it in android

I'm facing a problem when sharing an audio file which it's format is not mp3. the file is shared but with a shorter length for example if the file is 10 seconds it only shared 5 seconds. if I used mp3 format it's shared completely, but other formats…
1
2
3
20 21