Tuesday, January 28, 2014
How to communicate in real-time two Activity
I'm doing stuff serial communications, I find a ready serial transceiver, but need to write in an Activity inside the interface jump, I want other serial transceiver interface can also be achieved, can by One way to build a real-time communication between Activity, seek expert advice.
Reply:
A crude way is to put the data in a static class inside, 2 Activity which were constantly open a thread to get this static class data.
There is also a public data on the Service inside, Activity can also register a real-time broadcast data is received.
Reply:
The best serial transceiver and activity separate notice to each activity can change the data, radio, handler, listener callbacks can be achieved.
Reply:
Could be considered serial communication service writes, and then notify the activity issued by the broadcasting service
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment