Difference between revisions of "Share"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
<!-- GIDEROSOBJ:Share --> | <!-- GIDEROSOBJ:Share --> | ||
− | ''' | + | '''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform winrt.png]]<br/> |
− | ''' | + | '''Available since:''' Gideros 2020.7<br/> |
=== Description === | === Description === | ||
− | + | Sharing a text or an image with other apps on '''iOS''', '''Android''' and '''Windows Uwp'''. This invokes the platform default sharing dialog, allowing to save, print, send, share, etc. | |
+ | |||
+ | To use the '''Share''' plugin, add it to your project and call: | ||
+ | <syntaxhighlight lang="lua"> | ||
+ | require "Share" | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | '''There are some more parameters for iOS, right click the plugin -> Properties''' | ||
+ | |||
+ | === Example === | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
− | Share=require "Share" | + | Share = require "Share" |
− | Share.share("text/plain","Hello | + | Share.share("text/plain", "Hello Gideros!") |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | === References === | ||
+ | *'''https://android.googlesource.com/platform/external/mime-support/+/9817b71a54a2ee8b691c1dfa937c0f9b16b3473c/mime.types''' | ||
{|- | {|- | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === | + | === Methods === |
− | [[ | + | [[Share.new]] ''creates a new Share object''<br/><!--GIDEROSMTD:Share.new() creates a new Share object--> |
+ | [[Share.share]] ''shares data''<br/><!--GIDEROSMTD:Share.new(mimeType,data) shares data--> | ||
+ | |||
+ | [[Share:export]] ''exports data''<br/><!--GIDEROSMTD:Share.export(data,mimeType,filename) exports data--> | ||
+ | [[Share:import]] ''imports data''<br/><!--GIDEROSMTD:Share.import(mimeType,extension) imports data--> | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === < | + | === Events === |
− | === | + | [[Share_Event.SHARE_EXPORT_RESULT]]<br/><!--GIDEROSEVT:Event.SHARE_EXPORT_RESULT fileshareExportResult--> |
+ | [[Share_Event.SHARE_IMPORT_RESULT]]<br/><!--GIDEROSEVT:Event.SHARE_IMPORT_RESULT fileshareImportResult--> | ||
+ | === Constants === | ||
|} | |} | ||
{{GIDEROS IMPORTANT LINKS}} | {{GIDEROS IMPORTANT LINKS}} |
Latest revision as of 21:17, 20 February 2025
Supported platforms:
Available since: Gideros 2020.7
Description
Sharing a text or an image with other apps on iOS, Android and Windows Uwp. This invokes the platform default sharing dialog, allowing to save, print, send, share, etc.
To use the Share plugin, add it to your project and call:
require "Share"
There are some more parameters for iOS, right click the plugin -> Properties
Example
Share = require "Share"
Share.share("text/plain", "Hello Gideros!")
References
MethodsShare.new creates a new Share object Share:export exports data |
EventsShare_Event.SHARE_EXPORT_RESULT Constants |