serviceconnection

Android Loading listview items from service results in hang

Hello, In my Android application, I have a ListActivity. This ListActivity uses a SimpleAdapter that I fill with items from my service. So, in my code, I do: MySuperCoolService.Binder serviceBinder = null; private ServiceConnection serviceConnection = new ServiceConnection() { public void onServiceConnected(ComponentName classN...

I can't get rid of this error message: Activity <App Name> has leaked ServiceConnection <ServiceConnection Name>@438030a8 that was originally bound here

Hi All, I'm working on my first Android app, so I apologize if this is extremely obvious. I've got three activities in my app, and the user switches back and forth pretty frequently. I've also got a remote service, which handles a telnet connection. The apps need to bind to this service in order to send/receive telnet messages. E...

Thread used for ServiceConnection callback (Android)

Hi I'm developing an activity that binds to a local service (in onCreate of the activity): bindService(new Intent(this, CommandService.class), svcConn, BIND_AUTO_CREATE); I would like to be able to call methods through the IBinder in my lifecycle methods, but can not be sure that onServiceConnected have been called prior to these...

Android how do I wait until a service is actually connected?

I have an Activity calling a Service defined in IDownloaderService.aidl: public class Downloader extends Activity { IDownloaderService downloader = null; // ... In Downloader.onCreate(Bundle) I tried to bindService Intent serviceIntent = new Intent(this, DownloaderService.class); if (bindService(serviceIntent, sc, BIND_AUTO_CREATE))...

Do I need to call both unbindService and stopService for Android services?

In my Android app, I call both startService and bindService: Intent intent = new Intent(this, MyService.class); ServiceConnection conn = new ServiceConnection() { ... } startService(intent) bindService(intent, conn, BIND_AUTO_CREATE); Later, I attempt to both unbindService andstopService`: unbindService(conn); stopService(intent); ...