Skip to content

play-co/sharing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Devkit Sharing

devkit plugin for accessing native share

devkit_sharing

Usage

Installation

In your devkit app directory, run devkit install https://github.com/gameclosure/devkit-sharing.

JavaScript

First, import the sharing plugin

// Need to import the plugin
import Sharing;

// Some time later in the application
Sharing.share({
  message: 'This message brought to you by devkit sharing',
  url: '', // optional url to add to the message
  title: '', // optional title for sharing (helpful on android)
  image: '', // optional data uri - see test app for demo
  instructions: '', // optional header for share dialog on android

  filename: '' // optional  temp image filename on android (should end in .png)
}, function (completed) {
  // ios -- Sharing was canceled if completed is false
  // android -- completed is true unless an error was thrown (canceled or not)
});