Hi, I'm trying to understand the concept of the above; sercices, threads and AIDL. I understand a service, it runs in the background but in the UI thread. I understand threads... they're threads. AIDL, another Definition language - okay. What I don't really understand is how to get everything happy and talking to each other.
I have a service which is required to run in a new thread (it listens for TCP messages - this would obviously hang the ui), so presumably I start this in a new thread. But what is the best practise here? Would I create a new thread in the activity and call the service within that thread, or would I call the service normally and create a new thread in onCreate() or onStart()? Finally.. I'm making a new thread - so presumably for the server to actually receive a message and communicate back to the activity I need to take advantage of the AIDL, correct? In this case, presumably my service would implement the interface created by the AIDL? Finally though, I've seen IntentService (http://developer.android.com/ reference/android/app/IntentService.html), and read somewhere on this group that extending this class, rather than just Service, would handle the threads for me.. have I understood this correctly, and if so presumably I still need some interface created by the AIDL. Thanks, Ben -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en