package com.imofan.android.basic;
import android.app.IntentService;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

/**
 * 魔方数据发送服务
 * @author liyang
 *
 */
public class MFBasicService extends IntentService{
	
	public MFBasicService() {
		super("");
	}
	
    public MFBasicService(String name) {
		super(name);
	}
    
    
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
    
    @Override
	protected void onHandleIntent(Intent intent) {
    	 Mofang.sendDataByService(getApplicationContext());
         if(null!=intent && Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())){
             MofangAlarm.startMofangAlarm(getApplicationContext());
         }
	}
    
    @Override
    public void onDestroy() {
        super.onDestroy();
    }
	
}
