How to retrieve the Context object of Android in BeeWare Python to manipulate the clipboard? #3762
Unanswered
mymane1433223
asked this question in
Q&A
Replies: 1 comment
-
You can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using BeeWare to develop Android applications in Python.
I want to call Android's clipboard API in Python, for example:
from android.content import Context, ClipboardManager, ClipData
clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE)
clip = ClipData.newPlainText("label", "12345")
clipboard.setPrimaryClip(clip)
The problem is that I don't know how to get the context object in Python. In Java/Android, I can use this (Activity) or getApplianceContext(), but what should I do in the BeeWare environment of Python?
Beta Was this translation helpful? Give feedback.
All reactions