I have this issue: I have a main activity that is bound to a service, Also, that main activity can call a class (AsyncTask) that is a client that connects to a server and waits for data.
I tried to make the bind from class (AsyncTask) client to the service, but I don't know if that's possible or do I have to return data to the main activity so main activity can send it to the service?
I can do this in the main class
Intent intent = new Intent(getApplication(), ChatHeadService.class);
startService(intent);
bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE);
but how can I implement it in the class (AsyncTask) client?