Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [BUG] GetClipboardText() doesn't work if text was copied externally (Android)

Author
Message
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 22nd Oct 2018 07:32
I have already mentioned this in the latest version post but thought a seperate post might increase the chance of it being seen.

If you copy text from outside of the AppGameKit app GetClipboardText won't return it on Android. It only returns text if the text was copied from within the AppGameKit app.

On iOS and Mac it works fine.

On Android you can copy text from within the app and paste outside of the app but the reverse doesn't work.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd Oct 2018 14:34
Just tested copying text in the Keep app and GetClipboardText picks it up in AppGameKit on a Galaxy S8. It could be that the app you copied from doesn't copy to the primary clipboard, or it could be that there is something about the device that is interfering.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 22nd Oct 2018 18:01
I copied from Samsung Notes and Chrome. Neither worked. I'll try again after rebooting and closing everything.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 22nd Oct 2018 18:35
Still not working (for me). I haven't tried it with the October version of AGK. I only have the one Android device to test it on.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 24th Oct 2018 12:24 Edited at: 24th Oct 2018 17:26
@Paul, I asked my users to test it for me and here's a list of devices and Android versions provided so far where it works, or doesn't work

Works:
HTC U11 (8.0.0)
Huawei Mediapad T3 10" (7.0.0)
Lenovo Tab TB3 (6.0.0)
Oukitel U22 (7.0.0)
Samsung Galaxy J5 2016 (7.1.1)
Samsung GT-I9070 (4.1.2)
Samsung S8 (8.0.0) * 4
Sony (no model name given) (5.1.1)

Does not work:
Google Nexus 5 (6.0.1) (Gboard)
LG V10 (7.0) (LG Keyboard)
Samsung A5 2017 (8.0.0) (Default Samsung Keyboard) <-- My device
Samsung Galaxy S6 (7.0.0) (Default Samsung Keyboard)
Samsung Note (8.0.0) (Default Keyboard)

I'm fine with it not working for everyone if it works for most but I'll keep editing this post with updates that I get over the next couple of days in case anything proves useful. If you need any other information from my users that might prove helpful and is easy for them to get then please let me know.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Oct 2018 15:10
That's weird, I have a Nexus 5 running Android 6.0.1 and it works when pasting text copied from Keep or Chrome into AGK. Could you also ask the users whether they are using the system keyboard or a third party keyboard?

There is one thing that might be causing it, currently AppGameKit checks to see if the clipboard data is of type MIMETYPE_TEXT_PLAIN, it's possible that some devices use a different data type. I'll remove the check and attempt to convert it to text regardless and see what happens in the next version.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 24th Oct 2018 16:43
Thanks Paul. I've updated the list in my post above with a couple of more devices and have put beside the problem ones the keyboards the users are using (still waiting for a response from the Samsung Note user). We're all using the default/standard keyboards that come with the device.

I don't know if you have a beta testing group before you release each version but I'd be happy to check any early release as I've got a device it's not currently working with.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 24th Oct 2018 16:59
This is how I'm using it in my app. I've attached two screenshots in one image. When the editbox has focus a paste/clipboard icon/button appears on top. If they press it the editbox text is replaced with what's saved in the clipboard and the button disappears

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Oct 2018 23:16
I've attached a new player with the change

Attachments

Login to view attachments
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 24th Oct 2018 23:49
Thanks Paul. I'll have to try this tomorrow night now. I'll let you know if it works.

One user came back to me a little while ago and said that it worked for them but only if the text was copied from certain apps, so you may be right with the format of text. I only tried Samsung Notes and Chrome myself. I'll try the new player tomorrow, along with copying text from different apps if it still doesn't work.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 26th Oct 2018 12:50
Hi Paul, I can confirm that pasting text from another app into the AGK2 player you attached to your post works on my device. Thanks for fixing it for the next version.

Login to post a reply

Server time is: 2024-04-25 05:17:13
Your offset time is: 2024-04-25 05:17:13