We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TaskStackBuilder stackBuilder = TaskStackBuilder.create(con); stackBuilder.addParentStack(MainActivity.class); stackBuilder.addNextIntent(resultIntent); stackBuilder.getPendingIntent...
这样的模式为了创建完整的Activity队列,可能导致并不会调用已经存在的activity,而是重新创建,要想push消息等只调起已经存在的activity不要重新创建需要下面这样写: PendingIntent resultPendingIntent = PendingIntent.getActivity(con, 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.FLAG_UPDATE_CURRENT比较关键,如果不设置此值,会导致Intent消息不会更新到当前activity
PendingIntent resultPendingIntent = PendingIntent.getActivity(con, 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent.FLAG_UPDATE_CURRENT
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这样的模式为了创建完整的Activity队列,可能导致并不会调用已经存在的activity,而是重新创建,要想push消息等只调起已经存在的activity不要重新创建需要下面这样写:
PendingIntent resultPendingIntent = PendingIntent.getActivity(con, 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent.FLAG_UPDATE_CURRENT
比较关键,如果不设置此值,会导致Intent消息不会更新到当前activityThe text was updated successfully, but these errors were encountered: