Android Open Source - CakeUI Cake Service






From Project

Back to project page CakeUI.

License

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.

Java Source Code

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;
    }    
  }
}




Java Source Code List

com.cakeui.application.CakeApplication.java
com.cakeui.generic.activity.CakeActivity.java
com.cakeui.generic.adapter.CakeExpandableListViewAdapter.java
com.cakeui.generic.adapter.CakeGridViewAdapter.java
com.cakeui.generic.adapter.CakeListViewAdapter.java
com.cakeui.generic.dialog.CakeDialog.java
com.cakeui.generic.fragment.CakeFragment.java
com.cakeui.generic.service.CakePeriodicService.java
com.cakeui.generic.service.CakeService.java
com.cakeui.utils.CakeAsyncTask.java
com.cakeui.utils.CakeBroadcastReceiver.java
com.cakeui.utils.CakeComparator.java
com.cakeui.utils.CakeDataEncapsulation.java
com.cakeui.utils.CakeMap.java
com.cakeui.utils.enums.AsyncTaskType.java
com.cakeui.utils.enums.DialogType.java
com.cakeui.utils.enums.PagesOpen.java