2013年8月11日星期日

Android How is the service call another service in the thread ?

I novice , want to achieve functional : Mobile receive SMS command, and then send data via Bluetooth serial port .

Use broadcastreciver receive SMS broadcast , start a service, and then use the serial read and write threads write data to the Bluetooth serial port .
encounter the question is: How in this service call this Bluetooth serial read and write thread ?
------ Solution ---------------------------------------- ----
through the handler to
The easiest way is to write an application class service when moving an application object exists inside the handler , and then in the service to get inside through the application handler object handler obtained after simple
--- --- For reference only ---------------------------------------
not service in the serial read and write access to the Bluetooth thread Handler?
------ For reference only ---------------------------------------
  The reply deleted by an administrator at 2013-07-10 10:59:13

没有评论:

发表评论