android_studio/samples/user-interface/share/README.md
2026-06-26 03:26:01 +04:00

32 lines
865 B
Markdown

# Share samples
This sample demonstrates Share features in Android.
## Send data
Android Sharesheet provides the consistent user experience for any type of data your app sends to
other apps.
In this sample, we use [ShareCompat][1] to share various types of data:
[1]: https://developer.android.com/reference/androidx/core/app/ShareCompat
- Plain text
- Rich text
- Image
- Multiple images
Android Sharesheet also provides these customization options that cover all the practical use cases
you might need in your app.
- Add or reorder targets
- Know which app has received the data (API level 22+)
- Exclude target candidates (API level 24+)
- Add custom actions (API level 34+)
<img src="https://github.com/android/platform-samples/assets/1237536/d5733271-55ae-4b1a-bdc9-c4f9253e8d64" width="256" alt="Sharesheet" />
## Receive data
TODO: Add this later