0

I want to monitor android clipboard and display toast from QPython. Actually, I want to check the clipboard for any changes, if the clipboard has a particular string in it that matches a particular regex, I want to process it (the process is really simple, think of its complexity as converting to uppercase, or some similar easy operation) and display the resulting string in a toast. Also, the script should run in background, so that it can monitor the clipboard even if the foreground app is different (e.g. WhatsApp or browser).

I had written a similar native app, but unfortunately the corresponding Java library doesn't work anymore, so I have to rely on a python module that does the same job.

Is it possible to do this using QPython?

taninamdar
  • 137
  • 1
  • 8

1 Answers1

1

You may want to check out the androidhelper module in QPython, and sl4a module in QPython3.

Both have the ability to toast something on the screen, but not sure about clipboard.

I think you can set the clipboard data, and don't know how to get it.

Documentation can be found here