All Projects → britzl → defold-sharing

britzl / defold-sharing

Licence: MIT license
Defold native extension to share data from a Defold application using native dialogs

Programming Languages

C++
36643 projects - #6 most used programming language
java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language
Objective-C++
1391 projects

Projects that are alternatives of or similar to defold-sharing

platypus
Defold platformer engine
Stars: ✭ 31 (+55%)
Mutual labels:  defold, defold-library
defold-hyper-trails
Easy to use and customizable trail effect for the Defold game engine.
Stars: ✭ 33 (+65%)
Mutual labels:  defold, defold-library
defpro
Defold Profiler interaction using Lua
Stars: ✭ 19 (-5%)
Mutual labels:  defold, defold-library
jstodef
Library for sending messages from JavaScript to Defold (Lua)
Stars: ✭ 21 (+5%)
Mutual labels:  defold, defold-library
defold-eva
Basic defold module for mobile games
Stars: ✭ 21 (+5%)
Mutual labels:  defold, defold-library
extension-admob
Defold native extension which provides access to AdMob functionality on Android and iOS
Stars: ✭ 31 (+55%)
Mutual labels:  defold, defold-library
defos
Extra native OS functions for games written using the Defold game engine
Stars: ✭ 64 (+220%)
Mutual labels:  defold, defold-library
defold-playable-ads
Make playable ads with Defold! It's a project with Gulp tasks to bundle the Defold game into a single HTML file.
Stars: ✭ 15 (-25%)
Mutual labels:  defold, defold-library
DefVideoAds
UnityAds native extension for Defold engine.
Stars: ✭ 37 (+85%)
Mutual labels:  defold, defold-library
defold-metrics
Calculate and display performance metrics in Defold games
Stars: ✭ 23 (+15%)
Mutual labels:  defold, defold-library
defold-richtext
Defold-RichText is a system to create styled text based on an HTML inspired markup language
Stars: ✭ 35 (+75%)
Mutual labels:  defold, defold-library
extension-fbinstant
Facebook Instant Games extension for the Defold game engine
Stars: ✭ 39 (+95%)
Mutual labels:  defold, defold-library
defold-input
Simplify input related operations such as gesture detection, input mapping and clicking/dragging game objects
Stars: ✭ 67 (+235%)
Mutual labels:  defold, defold-library
drawpixels
Defold engine native extension for drawing pixels into texture buffer.
Stars: ✭ 46 (+130%)
Mutual labels:  defold, defold-library
gooey
Defold GUI system
Stars: ✭ 99 (+395%)
Mutual labels:  defold, defold-library
DAABBCC
Dynamic AABB Tree native extension with Branch and Bound Algorithm for Defold Engine
Stars: ✭ 42 (+110%)
Mutual labels:  defold, defold-library
defnet
Defold networking examples
Stars: ✭ 52 (+160%)
Mutual labels:  defold, defold-library
extension-gpgs
Defold native extension for Google Play Game Services
Stars: ✭ 19 (-5%)
Mutual labels:  defold, defold-library
defold-router
whDefRouter — screen management solution for Defold Game Engine (includes demo project)
Stars: ✭ 25 (+25%)
Mutual labels:  defold
defoldexamples
A small examples project to test code snippets
Stars: ✭ 16 (-20%)
Mutual labels:  defold

Defold Sharing

Defold native extension to share application data using native sharing dialogs.

System requirements

The extension currently supports OSX, iOS, Android and HTML5. Browser compatibility

Installation

You can use the Sharing extension in your own project by adding this project as a Defold library dependency. Open your game.project file and in the dependencies field under project add:

https://github.com/britzl/defold-sharing/archive/master.zip

Or point to the ZIP file of a specific release.

Starting Defold 1.2.165 the Android dependencies are resolved using the build.gradle file.

Usage

The share.* namespace will be nil if the share extension isn't supported (see System requirements above).

share.text(text)

Share text using a native sharing dialog.

PARAMETERS

  • text (string) - The text to share

share.image(bytes, [text], [file_name])

Share an image (with optional text) using a native sharing dialog. Supported formats depend on the platform:

  • Android - The image format must be supported by BitmapFactory.decodeByteArray(). On Android the image will first be stored locally as a file and then shared using a FileProvider.
  • iOS and macOS - The image format must be supported by UIImage.initWithData.
  • HTML5 - Either DataURI or any image format supported by the underlying platform.

PARAMETERS

  • bytes (string) - The image bytes to share
  • text (string) - Optional text to share
  • file_name (string) - Optional Only for HTML5 image name. Default "file.png"

share.file(path, [text], [options])

Share a file (with optional text) using a native sharing dialog. On Android the file will first be copied to a predefined location and then shared using a FileProvider. Files are shared with their original filename and extension. This will allow iOS to offer different kinds of applications depending on the shared content.

PARAMETERS

  • path (string) - Full path to the file to share. For HTML5: specify the name of the file. Default file.txt.

  • text (string) - Optional text to share. For HTML5: specify the data that should be in the file.

  • options (table) - Optional Only for HTML5.

    • type (string) - data type. Default "text/plain"
    • text (string) - text to be shared
    • title (string) - title to be shared. May be ignored by the target
    • url (string) - URL to be shared
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].