android - Google Glass Broadcastreceiver across activities -
I have an activity where I am creating a Broadcast Reciver and with Bluetooth anyone I'm making connections on other devices. In my main activity there is a set of cards in CardScrollView . In this array, the cards are the devices that find my app that are able to establish the connection. When I connect to a device, I am opening another activity with another CardScrollView and the second set of cards, the Bluetooth connection remains, but I no longer exchange information Even if I return to main activity
The question is, should I register BroadcastReiveriver separately? Or is not my best thing about another activity?
Make your broadcast receiver independent of your activities, such as an event bus in a service or simply manifests With a mechanism as a separate class.
Comments
Post a Comment