Share.share
From GiderosMobile
Available since: Gideros 2020.7
Class: Share
Description
Sharing a piece of data with an external app.
Share.share(mimeType,data)
This invokes the platform default sharing dialog, allowing to save, print, send, share, etc.
Supported MIME types:
- "text/*"
- "image/png"
- "image/jpeg"
Parameters
mimeType: (string) the MIME type of the data
data: (string) the data itself
Example
local b = Buffer.new("diploma.jpg")
rt:save("|B|diploma.jpg")
local bdata = b:get()
b = nil
collectgarbage()
print("DIPLOMA:", #bdata)
local ok, share = pcall(function() return require "Share" end)
if ok then
-- Analytics("diploma_share")
share.share("image/jpeg", bdata)
end