SmartShareX Extension

SmartShareX is a compact extension for MIT App Inventor that turns your app into a native Android Share Target โ€” receive text, links, single or multiple files shared from any other app, with a clean native bottom sheet, custom actions, and background (silent) handling.

:sparkles: Features

:outbox_tray: Native Share Sheet

  • Your app appears in Android's system Share menu automatically

  • Shows a native bottom sheet with title, subtitle (auto filename/link/text preview), and action items

  • Follows system dark/light mode by default, or force override with SetDarkMode()

:puzzle_piece: Custom Actions

  • Replace the built-in "Open in app" / "Save for later" pair with your own items via AddItem(id, title, background)

  • background = true handles the share silently โ€” no app UI opens, call CloseBackgroundShare() when done

  • background = false opens your app normally in foreground

:memo: Title & Subtitle Control

  • SetSheetTitle() โ€” custom title

  • SetSheetSubtitle() โ€” custom subtitle text

  • HideSheetSubtitle() โ€” hide it completely

  • UseDefaultSheetSubtitle() โ€” revert to automatic filename/link/text preview

:package: Rich Content Access

  • GetSharedText(), GetSharedUrl() โ€” text/link shares

  • GetSharedFileUri(), GetSharedFileName() โ€” single file shares

  • GetFileCount(), GetFileUriAt(), GetFileNameAt() โ€” multiple file shares

  • GetShareSummary() โ€” one-block summary of what was shared

:high_voltage: Clean Event System

ShareReceived(contentType, actionId, isBackground) โ€” one event for every share, whether text, single file, or multiple files, and whether the user tapped a built-in or custom item.

ShareError(message) โ€” fires if the shared content couldn't be read.

:stopwatch: Background Timeout Control

SetBackgroundTimeout(seconds) โ€” auto-closes a silent background share if CloseBackgroundShare() is never called (default 8s).

:puzzle_piece: Main Functions

AddItem() ยท SetSheetTitle() ยท SetSheetSubtitle() ยท HideSheetSubtitle() ยท UseDefaultSheetSubtitle() ยท SetDarkMode() ยท SetBackgroundTimeout() ยท CloseBackgroundShare()

:mobile_phone: Designed For

MIT App Inventor โ€ข Save-for-later apps โ€ข Note/clipboard tools โ€ข File & media savers โ€ข Any app that receives shared content from other apps

Built with Java + Rush CLI. :heart:


:inbox_tray: Download

SmartShareX Extension:

com.zebdroid.smartsharex.aix (38.1 KB)

Some example blocks and example aia project would be helpful...

What is a sheet?

1 Like