Cross-app content sharing API for mobile targets. Supports sharing of raw text, and files with associated mimetype.

Uses Action Sheet on iOS and ACTION_SEND Intents on Android.

NB: on iPad, iOS design guidelines requires a point on screen as the origin for the share popover. You can do this by passing a reference to a UX element.

You need to add a reference to "Fuse.Share" in your project file to use this feature.

Example

<JavaScript>
    var Share = require("FuseJS/Share")
    var Camera = require("FuseJS/Camera")
    module.exports = {
        shareFile : function()
        {
            Camera.takePicture(320,240)
            .then(function(image) {
                Share.shareFile(image.path, "image/*", "Photo from Fuse");
            });
        },
        shareText : function()
        {
            Share.shareText("https://www.fusetools.com/", "The link to Fuse website");
        }
    }
</JavaScript>

iPad example

<Panel>
    <Button Text="Share" Clicked="{shareText}"/>
    <Panel ux:Name="ShareOrigin" Alignment="Center" Width="1" Height="1" />
    <JavaScript>
        var Share = require("FuseJS/Share")
        module.exports = {
            shareText : function()
            {
                // The iOS popover will use the position of ShareOrigin as its spawn origin
                Share.shareText("https://www.fusetools.com/", "The link to Fuse website", ShareOrigin);
            }
        }
    </JavaScript>
</Panel>

Location

Namespace
Fuse.Share
Package
Fuse.Share 1.9.0

Interface of ShareModule

Inherited from NativeModule

Inherited from Module

GetFile : FileSource uno

Returns the file source that will be watched by the Context for changes in Fuse preview. Override in subclasses and return correct file source to support live updates in Fuse preview.

Inherited from object

Attached UX Attributes

GlobalKey (attached by Resource) : string ux

The ux:Global attribute creates a global resource that is accessible everywhere in UX markup.

Implemented Interfaces