Skip to content

A Zebble plugin for using device sharing functionality

Notifications You must be signed in to change notification settings

Geeksltd/Zebble.Sharing

Repository files navigation

Zebble.Sharing

logo

A plugin for using native sharing functionality in Zebble application.

NuGet

This plugin make you able to set clipboard and share something in an easy way on Android, iOS, and UWP platforms in Zebble Apps.


Setup


Api Usage

Call Zebble.Device.Sharing from any project to gain access to APIs.

Share:

The following code will open a dialog allowing the user to select a media to share some text or URL.

await Zebble.Device.Sharing.Share(text: "My Message", title: "My Title", url: "http://example.com");

// Note: You should provide at least one of the parameters.

For example, you can call it in the event handler of a button reading "Share".

SetClipboard:

The following code allows you to copy some text into clipboard:

await Device.Sharing.SetClipboard("some text");

Android allows you to specify a label for the clipboard as well. If you want to use that feature then you can use the following overload:

await Device.Sharing.SetClipboard("some text", "android specific label");

// Note: the label will be ignored in iOS and Windows platforms.

Methods

Method Return Type Parameters Android iOS Windows
Share Task<bool> text -> string
title -> string
url -> string
androidChooserTitle -> string
iosExclude -> DeviceSharingOption
errorAction -> OnError
x x x
SetClipboard Task<bool> text -> string
errorAction -> OnError
x x x
SupportsClipboard Task<bool> errorAction -> OnError x x x

About

A Zebble plugin for using device sharing functionality

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages