从service启动activity startActivity慢 的解决方案

Intent intent = new Intent(context, A.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); try {  pendingIntent.send(); } catch (PendingIntent.CanceledException e) {  e.printStackTrace(); }

转载于:https://www.cnblogs.com/qianyukun/p/6729081.html

你可能感兴趣的:(移动开发)