/** * Hook method called when the DownloadActivity becomes visible to bind the Activity to the * Services. */ @Override public void onStart() { super.onStart(); // Bind this activity to the DownloadBoundService* Services if // they aren't already bound Use mBoundSync/mBoundAsync if (mDownloadCall == null) bindService( DownloadBoundServiceSync.makeIntent(this), mServiceConnectionSync, BIND_AUTO_CREATE); if (mDownloadRequest == null) bindService( DownloadBoundServiceAsync.makeIntent(this), mServiceConnectionAsync, BIND_AUTO_CREATE); }