package com.qiyou.mb.android.receivers;

import com.qiyou.mb.android.QiYouConstant;
import com.qiyou.mb.android.service.LocationService;
import com.qiyou.mb.android.utils.log.QLog;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class BootReceiver extends BroadcastReceiver {

	public static String TAG ="com.qiyou.BroadcastReceiver"; 
    public static final String dTAG ="com.qiyou";
	
	 @Override
    public void onReceive(Context context, Intent intent) {
			QLog.getLogger().d(dTAG,TAG+" intent.getAction() " +intent.getAction());
        if (intent.getAction().equals(QiYouConstant.EXTRA_KEY_BOOT)){     
        	QLog.getLogger().d(dTAG,TAG+" Android started, to check last track status " );
            Intent serviceIntent = new Intent(context, LocationService.class); 
		       serviceIntent.putExtra(QiYouConstant.EXTRA_KEY_BOOT, "True");
		       context.startService(serviceIntent); 
            
        }
    }
}
