See the App Inventor Extensions document about how to use an App Inventor Extension.
For questions about this extension or bug reports please start a new thread in the
App Inventor community. Thank you.
For feature requests please contact me by email.
To be a sponsor of a new method already is possible starting from only 10 USD! With your contribution you will help the complete App Inventor community. Thank you.
April 28th, 2017: Version 1: initial version
Nov 6th, 2018: Version 1a: fix for SDK26 release to avoid the Runtime error filename exposed beyond app through ClipData.Item.getUri() while sharing a file.
March 24th, 2023: Version 2: SDK31 update.
Note: this version of the extension is not compatible with earlier versions. You therefore have to remove the extension from your project and then import it as new extension.
Sharing extension.
Required permissions: android.permission.READ_EXTERNAL_STORAGE
Note: This extension is a modified version of the Sharing component.
Modifications:
Set the default text of the sharing dialog. Default is 'Share using'.
Shares a message through any capable
application installed on the phone by displaying a list of the available apps and
allowing the user to choose one from the list. The selected app will open with the
message inserted on it.
Shares both a file and a message through any capable application
installed on the phone by displaying a list of available apps and allowing the user to
choose one from the list. The selected app will open with the file and message inserted on it.
Message also can be empty to send only a file without message.
You can't share a file directly from the assets of your app.
Shares both a file and a message through Whatsapp
without opening the app chooser. FileName or message also could be emtpy.
You can't share a file directly from the assets of your app.
Version 2 has been tested successfully on Samsung A51 running Android 13.
Developing and maintaining snippets, tutorials and extensions for App Inventor takes a lot of time.
I hope it saved some of your time. If yes, then you might consider to donate a small amount!
or donate some mBTC to Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Thank you! Taifun
Download TaifunSharing extension (aix file)
Download Sharing Test (aia file)
Back to top of page ...
This work by Pura Vida Apps
is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.