I am new to writing Android programs.
I need to create a program that has three running threads:
1. A continually running process that monitors user interactions
2. A process that is called every 200 msec to check system status.
3. A process that monitors the UDP channel (or runs other blocking calls).
All three processes need to continue to run even if there are no incoming messages on the UDP port, or if I change the wait time.
I can handle the communications monitoring, but I need help setting up the multi-threaded part.
Can someone direct me to a COMPLETE sample project that shows how to set up such multi-threaded program? I have had people direct me to code snippets, but there is always something left out and I have not been able to get them to compile and run.
(For example, the UDP samples that people supply always talk to themselves, and not to other devices, so they don't worry about blocking calls and there is no check to see if it really went out over the network.)
Thanks,
Dan
I need to create a program that has three running threads:
1. A continually running process that monitors user interactions
2. A process that is called every 200 msec to check system status.
3. A process that monitors the UDP channel (or runs other blocking calls).
All three processes need to continue to run even if there are no incoming messages on the UDP port, or if I change the wait time.
I can handle the communications monitoring, but I need help setting up the multi-threaded part.
Can someone direct me to a COMPLETE sample project that shows how to set up such multi-threaded program? I have had people direct me to code snippets, but there is always something left out and I have not been able to get them to compile and run.
(For example, the UDP samples that people supply always talk to themselves, and not to other devices, so they don't worry about blocking calls and there is no check to see if it really went out over the network.)
Thanks,
Dan