@Override
public void onReceive(Context context, Intent intent) {
Log.d(\"XRGPS\", \"BootReceiver.onReceive: \" + intent.getAction());
if (ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
Intent mBootIntent = new Intent(context, MainActivity.class);
mBootIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(mBootIntent);
} else {
Log.w(\"XRGPS\", \"BootReceiver: unsupported action\");
}
}
}
本文地址:https://www.stayed.cn/item/16331
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我