question: @ Override public int onStartCommand ( Intent intent , int flags , int startId ) { Log_OC . d ( TAG , "Starting command with id " + startId ) ; if ( ! intent . hasExtra ( EXTRA_ACCOUNT ) || ! intent . hasExtra ( EXTRA_FILE ) ) { Log_OC . e ( TAG , "Not enough information provided in intent" ) ; return START_NOT_STICKY ; } else { final Account account = intent . getParcelableExtra ( EXTRA_ACCOUNT ) ; final OCFile file = intent . getParcelableExtra ( EXTRA_FILE ) ; AbstractList < String > requestedDownloads = new Vector < String > ( ) ; try { DownloadFileOperation newDownload = new DownloadFileOperation ( account , file ) ; newDownload . addDatatransferProgressListener ( this ) ; newDownload . addDatatransferProgressListener ( ( FileDownloaderBinder ) mBinder ) ; Pair < String , String > putResult = mPendingDownloads . putIfAbsent ( account . name , file . getRemotePath ( ) , newDownload ) ; if ( putResult != null ) { String downloadKey = putResult . first ; requestedDownloads . add ( downloadKey ) ; sendBroadcastNewDownload ( newDownload , putResult . second ) ; } } catch ( IllegalArgumentException e ) { Log_OC . e ( TAG , "Not enough information provided in intent: " + e . getMessage ( ) ) ; return START_NOT_STICKY ; } if ( requestedDownloads . size ( ) > 0 ) { Message msg = mServiceHandler . obtainMessage ( ) ; msg . arg1 = startId ; msg . obj = requestedDownloads ; mServiceHandler . sendMessage ( msg ) ; } } return START_NOT_STICKY ; }
target:  Entry point to add one or several files to the queue of downloads. New downloads are added calling to startService(), resulting in a call to this method. This ensures the service will keep on working although the caller activity goes away.