Android HomeScreen Widget #2316
-
Hello, Does Toga support "HomeScreen Widgets"? I'm planning to create an Android app that can read data from an ESP32 via BLE. It would be great to have a widget to read the data without opening the app. Many thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There's no cross-platform Toga API for writing a Home Screen widget. However, almost any platform-specific API can be accessed via the bridging layer that Toga uses, so it might be possible to write one. As for whether BLE can be accessed - again, there's no cross-platform BLE layer in Toga at present, so you'd need to wrap a platform-specific BLE library or make calls on native BLE libraries. I can't say I know enough about Android's capabilities in this space to know whether what you're proposing (a widget that runs logic when not active is possible). You'll need to research the native capabilities of Android to establish what is possible, and how to implement it. |
Beta Was this translation helpful? Give feedback.
There's no cross-platform Toga API for writing a Home Screen widget. However, almost any platform-specific API can be accessed via the bridging layer that Toga uses, so it might be possible to write one.
As for whether BLE can be accessed - again, there's no cross-platform BLE layer in Toga at present, so you'd need to wrap a platform-specific BLE library or make calls on native BLE libraries.
I can't say I know enough about Android's capabilities in this space to know whether what you're proposing (a widget that runs logic when not active is possible). You'll need to research the native capabilities of Android to establish what is possible, and how to implement it.