I'm still new to Android development but I am currently working on a project that requires the Bluetooth interface to be in constant communication with a Bluetooth-device. I've been reading up on Service
, IntentService
& AsynTask
but I am still confused. I think I should not be using AsyncTask
as it is meant for processing a very short task? If I use IntentService
, how do I spawn multiple threads to check if the Bluetooth device is connected, sending and receiving?
I'm using the BluetoothViewer as my reference. In it connectThread
is a thread which, when connected to the Bluetooth device, would then start the connectedThread
.
Thanks
Ken