Catching Android Broadcast Intents from within Toga #3779
mborus
started this conversation in
Debugging help
Replies: 2 comments
-
|
It looks like it should be possible to write equivalent Python code with Chaquopy. Here are the main points:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks for the comment. I had problems trying to find out how to use Java within Toga at all. |
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.
-
Hi,
I'm writing a Toga App targetting Andriod (version 15)
The device has some hardware that sends an intent when I push a button to scan a bar code.
The intent is "com.example.EVENT" and I need to access "EXTRA_EVENT_DECODE_VALUE" of the type byte array of this event.
When connecting the device via USB cable, I can verify that the intent fires, because it shows up on the
ADB command "adb logcat -v time ActivityManager:I Broadcast*:I *:S | findstr /i "com.example.EVENT" (Windows findstr is similar to grep on Linux)
I have some example Java code on how to access the Intent data. I had some help and we ran Java code on the device that caught the intent. Alas I'm not an Andriod/Java expert and have failed to catch this Intent via Chaquopy so far and to make the code work with Toga on Android.
I'm looking for hints on how to catch the Intent or
how to add the Java code so I can access the data via getLastScanBytes.
This is the java code we used in testing
Beta Was this translation helpful? Give feedback.
All reactions