Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: KrzysztofZuk on May 16, 2018, 04:50:32 PM

Title: Copy string value to device clipboard - Wanted !
Post by: KrzysztofZuk on May 16, 2018, 04:50:32 PM
Hello, is there possibility to create action that will copy String value to the device clipboard :) ?
I created app that show latitude and longitude on android device, and i want to give user possibility to copy this information to the android clipboard (mayby he want send that info to other user, or paste it on google maps etc :)).

Cheers, Chris !
Title: Re: Copy string value to device clipboard - Wanted !
Post by: djaydino on May 16, 2018, 05:27:17 PM
Hi,
I was looking a bit in the unity forums and i found this :
https://answers.unity.com/questions/885081/can-i-set-a-string-to-androids-clipboard.html

It has a link to this github project and you can get the unitypackage here :
https://github.com/sanukin39/UniClipboard/tree/master/dist

It works for android and ios

So i made 2 actions for it, i did not have time to test them (needs to be tested on a device) but i think that they should work.

You can get then on the attachment below.

Please let me know if they work or not :)
Title: Re: Copy string value to device clipboard - Wanted !
Post by: KrzysztofZuk on May 16, 2018, 07:17:11 PM
Thank you very much for answer :) !
Hmm, those actions don't work for me, they don't copy or paste data to clipboard on android and inside in Unity :(. Those action also blocks state (In the state with those actions inside, Unity don't want to go to the next state (with "Finished" event).

Cheers!
Title: Re: Copy string value to device clipboard - Wanted !
Post by: djaydino on May 16, 2018, 08:08:10 PM
Hi,
Oops i forgot to add finished();

i updated the attachment and also added it below

I also added a debug log that will show in the console, when used in the editor to warn that it does not work in the editor.

can you redownload and try again :)

If they still don't work (on adroid)  i will try to test tomorrow.
Title: Re: Copy string value to device clipboard - Wanted !
Post by: KrzysztofZuk on May 17, 2018, 02:27:38 PM
Hello, yeah, now it working great :) . Thank you very much for help :) !!!