Back to project page CakeUI.
The source code is released under:
GNU General Public License
If you think the Android project CakeUI listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cakeui.generic.service; /* www. j av a 2 s .c om*/ import android.app.Service; import android.content.Intent; import android.os.Binder; import android.os.IBinder; /** * Class that implements a generic service. * * @author Sarah Caixeta * @email caixeta.sarah@gmail.com * */ public class CakeService extends Service{ @Override public IBinder onBind(Intent arg0) { return new CakeBinder(); } @Override public void onCreate() { super.onCreate(); performTask(); } /** * Method to be overrided to perform some task. Cannot make UI changes. */ protected void performTask(){} /** * Binder used to return a instance of the service when some activity or service binds with it. * @author Sarah Caixeta */ public class CakeBinder extends Binder { public CakeService getService() { return CakeService.this; } } }