react-native/docs/share.md
Héctor Ramos 9ec9567390 Flatten jsdocs to markdown plaintext
Differential Revision: D6261799

fbshipit-source-id: 269e151c5d136c1d508d9f2a060c0c670d0fe0f2
2017-11-07 16:46:52 -08:00

1.3 KiB

id title layout category permalink next previous
share Share docs APIs docs/share.html statusbarios settings

Methods


Reference

Methods

share()

static share(content, options)

Open a dialog to share text content.

In iOS, Returns a Promise which will be invoked an object containing action, activityType. If the user dismissed the dialog, the Promise will still be resolved with action being Share.dismissedAction and all the other keys being undefined.

In Android, Returns a Promise which always be resolved with action being Share.sharedAction.

Content

  • message - a message to share
  • title - title of the message

iOS

  • url - an URL to share

At least one of URL and message is required.

Options

iOS

  • subject - a subject to share via email
  • excludedActivityTypes
  • tintColor

Android

  • dialogTitle

sharedAction()

static sharedAction()

The content was successfully shared.


dismissedAction()

static dismissedAction()

The dialog has been dismissed. @platform ios