Skip to content

Share Sheet

You'll teach an app to hand text and a picture to the rest of the phone, and to open at the right screen when someone taps a link to it.

About

An app lives among other apps, and the share sheet is how a phone passes things between them. Sending something out is a few lines on either platform. The other direction, a link that opens your app at a specific screen, takes a little more care. Start with a custom URL scheme like myapp://item/42, which works on both platforms without a server. The proper kind, an ordinary https link that opens your app, needs a file hosted on a domain you own, and it's a good thing to add once you have one.

At a glance

Per requirement
15 XP
Completion bonus
75 XP
Requirements
5
Takes
One or two evenings
Skill level
Intermediate (months of practice)
Cost
Free
Supplies
Nothing special
Where
At home
Other people
On your own

Requirements

  1. 1
    Share a line of text from your app through the system share sheet. Use the platform's own share (ShareLink, ACTION_SEND, or share_plus in Flutter) rather than building your own picker. Film tapping share and sending the text into a messaging app. Video
  2. 2
    Share an image from your app. On Android an image goes out through a content URI from a FileProvider, and getting that wrong is the classic afternoon lost. On iOS you hand over the image itself. Film sharing a picture from your app into Photos or Messages. Video
  3. 3
    Register a URL scheme and open the app from a link. Pick a scheme nobody else is likely to use. Send yourself the link in a note or a message, tap it, and watch the app open. Film the tap. Video
  4. 4
    Make the link open the right screen, and make a bad link fail politely. Parse the path, navigate to the item, and handle the case where the app was fully closed when the link arrived. A wrong id should show a sentence, not a crash. Film one good link and one bad link. Video
  5. 5
    Receive text shared from another app. On Android an intent filter puts you in every app's share sheet in ten minutes. On iOS the proper way is a Share Extension, which is a separate target and an afternoon more. The cheap iOS route is a Shortcut that takes the shared text and opens your URL scheme, and that counts. Film sharing text from a browser into your app. Video