A andreas Member Licensed User Longtime User Feb 9, 2011 #1 Hi, I' m working on an applet where the PC sends commands to PHONE (make calls, send sms etc). This is based on Serial library. I have the following problem: When my Activity loses focus (Activity_Pause, because of an incoming call, opening another task by user or screen turning off) messages are not send but queued and waiting for Activity_Resume. Then, the LogCat list is like this : Code: Copy ** Activity (main) Pause, UserClosed = false ** sending message to waiting queue. sending message to waiting queue. running waiting messages (2) [My Message #1] [My Message #2] ** Activity (main) resume ** My question is, Is it possible to keep the app live and continue listen in the background ? Can i handle new messages when the screen is turned off? Thank you
Hi, I' m working on an applet where the PC sends commands to PHONE (make calls, send sms etc). This is based on Serial library. I have the following problem: When my Activity loses focus (Activity_Pause, because of an incoming call, opening another task by user or screen turning off) messages are not send but queued and waiting for Activity_Resume. Then, the LogCat list is like this : Code: Copy ** Activity (main) Pause, UserClosed = false ** sending message to waiting queue. sending message to waiting queue. running waiting messages (2) [My Message #1] [My Message #2] ** Activity (main) resume ** My question is, Is it possible to keep the app live and continue listen in the background ? Can i handle new messages when the screen is turned off? Thank you
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2011 #2 Yes. You should use a Service for the communication. Services are not paused. Upvote 0
A andreas Member Licensed User Longtime User Feb 10, 2011 #3 Erel said: Yes. You should use a Service for the communication. Services are not paused. Click to expand... Erel, thanks for direction. I'm start learning. Upvote 0
Erel said: Yes. You should use a Service for the communication. Services are not paused. Click to expand... Erel, thanks for direction. I'm start learning.