} if (ACTION_BOOT.equals(intent.getAction())||ACTION_NET_CHANGE.equals(intent.getAction())){
Intent service = new Intent(context,DownloadService.class);
context.startService(service);
Intent pSrvice = new Intent(context,PushService.class);
context.startService(service);
context.startService(pSrvice);
Log.v("TAG", "开机自动服务自动启动.....");
Toast.makeText(context, "push已启动", Toast.LENGTH_SHORT).show();
}else{
Log.d(TAG, "[MyReceiver] Unhandled intent - " + intent.getAction());
}
原文地址:http://1137907860.blog.51cto.com/10452906/1678534