Service stopSelf - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Service stopSelf method.

This code example shows how to use the following methods:stopSelf
        if (service_ == null) {
            LogUtil.Trace(); 
            return; 
        } 
 
        service_.stopSelf();
    } 
 
} 
4
CodeRank
This code example shows how to use the following methods:stopSelf
		return null; 
	} 
 
	@Override 
	protected void onPostExecute(Void result) {
		service.stopSelf();
	} 
} 
3
CodeRank
This code example shows how to use the following methods:stopSelf
	 */ 
	protected void shutdownOnConflict() { 
		// We need to exit the service if other version (free/paid) are 
		// installed. 
		doLog("Service shutdown: Multiple versions installed."); 
		this.parent.stopSelf();
	} 
} 
3
CodeRank
This code example shows how to use the following methods:stopSelf
		this.service = service;
	} 
 
	@Override 
	public void onCompletion(MediaPlayer mp) {
		service.stopSelf();
	} 
 
} 
4
CodeRank
This code example shows how to use the following methods:stopSelf
			mNM.cancel(notificationIndex);
			complete = false;
		} 
		editor.putBoolean("serviceOn", false);
        editor.commit();
		context.stopSelf(startedId);	
		 
	} 
	@Override 
	public int onStartCommand(Intent intent, int flags, int startId) {
	    Log.i("SENSOR", "Received start id " + startId + ": " + intent);
	    Bundle extras = intent.getExtras();
	    //Obtenemos el botón pulsado. 
	    activity = extras.getString("activity");
	    startedId = startId;
	    return START_STICKY;
	     
	} 
 
	@Override 
3
CodeRank

Related Service stopSelf Questions & Answers:

stopSelf Method Overview
Stop the service, if it was previously started.
See Code Examples for other Android Service Methods: