How to access OS clipboard on android ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kerdefi

Hello,

I’m trying to access the OS clipboard on android to copy / paste between my godot app and other apps using:

  • Copy : var string = OS.clipboard (I also tried var string = OS.get_clipboard())
  • Paste : OS.clipboard = string (I also tried OS.set_clipboard(string))

It works fine as a local copy / paste in my godot app, but not with other apps: I cannot access the OS clipboard.
To be noted that it works fine on windows: the same code accesses the OS clipboard.

Am’I missing something ? A permission during export ?

Thanks,

Wow it was asked 2018. Is there no solution until now?

Losatu | 2021-07-26 19:29

OS.set("clipboard","string")

It worked for me on Android (Godot 3.5)