package com.jqyd.shareInterface; import com.jqyd.app.ShareMethod; import com.jqyd.manager.MainActivity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; public class BootBroadCastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub ShareMethod shareMethod = new ShareMethod(context); try { shareMethod.recordLog("*_*---开机启动位置上报service---*_*"); Intent myIntent = new Intent(); //myIntent.setClass(context, JqgjService.class); context.startService(myIntent);// 开机 启动服务 context.startService(new Intent(context,UpPlanService.class)); context.startService(new Intent(context,UpLocationService.class)); shareMethod.recordLog("开机启动开屏锁屏service"); Intent screenIntent = new Intent(); screenIntent.setClass(context, ScreenService.class); context.startService(screenIntent);// 开机 启动服务 shareMethod.recordLog("*_*---开机启动网络监测service---*_*"); Intent stateIntent = new Intent(); stateIntent.setClass(context, ConnectStateService.class); context.startService(stateIntent);// 开机 启动服务 } catch (Exception e) { shareMethod.recordLog("BootBroadCastReceiver onReceive 开机启动位置上报service--出现异常"); } } }