Clipboard, Sharing and Image Processing

I’ve created three new native extensions:

  • Sharing - Sharing is caring! Share application data using native sharing dialogs.
  • Clipboard - Copy and paste like a boss! Perfect for getting that long password into a Defold text field or for sharing a generated invite link.
  • Imp - Image processing on Defold image buffers. Perform edge detection, sharpen, blur or emboss (like a boss)!

Nothing fancy really, but maybe useful for someone. The sharing and clipboard extensions are mainly wrapping native code while Imp was created to experiment a bit more with the workflow of the Defold buffer system.

Note: The Android support is not yet working for Sharing and Clipboard.

14 Likes

WOW! SUPER-COOL!
I had plans to make a sharing NE, and I’m happy that you ahead of me =)

Would be great to have a possability to add image to sharing and html5 version for main networks =)

Thank you for these great NEs!!

3 Likes

Ooh, awesome! I also had a plan that involved access to the clipboard. Have you had a chance to test these on windows? (sometimes I feel like the lone, nagging, windows user around here :worried:)

2 Likes

The Clipboard extension works on Windows (I’ve tested on Windows 7). The Sharing extension doesn’t support Windows yet (although there is some kind of sharing thing in Windows 10 right?)

1 Like

Yes, image sharing should be fairly trivial to add (https://github.com/britzl/defold-sharing/issues/1)

Hmm, can this be done in an easy way?

2 Likes

I think not( Only implementation of API every network separately.
I’ll try to find a service that can do this more universal.

UPD:I use for my blog shareaholic, need to check is it possible to use in html5 game.

2 Likes

If there is I never use it…

For HTML5 since you most of the time want to share to social networks with some text + an image you would need to setup those things based on links plus maybe some custom server code. Like https://twitter.com/home?status=Oh%20wow%20I%20got%20a%20super%20high%20score%20in%20Defold%20game!%2035,600!%20Watch%20my%20replay!

It could be used on Windows too to open link in default browser.

1 Like

Android support for the Sharing extension has been added. (And I have rekindled my hate for Android coding)

8 Likes

And now the Clipboard extension has Android support as well.

1 Like

Image sharing using share.image(bytes) is now also supported.

3 Likes

Duplicate the answer from the community page:
@britzl Is it possible to create sharing gifs or video via instagram/twitter from the game?

Yeah, I’m sure that would be possible to create, but we need the ability to create gif images or record video. The sharing API should be easy to extend. Please create an issue/feature request on GitHub.

1 Like