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
> ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningTaskInfo> taskList = activityManager.getRunningTasks(100); // 获得当前运行的task String packageName = context.getPackageName(); for (ActivityManager.RunningTaskInfo taskInfo : taskList) { // 找到当前应用的task,并启动task的栈顶activity,达到程序切换到前台 if (taskInfo.topActivity.getPackageName().equals(packageName)) { activityManager.moveTaskToFront(taskInfo.id, 0); break; } }
2024年12月31日,经测试。这个方法可以再应用后台时,点击通知栏唤起应用到前台。 步骤1:不要通过flutter插件引用,将源码下载到本地。(本人下载的插件版本是 dev-3.x的源码) 步骤2:找到本地下载的源码中,点击通知后的回调方法。JPushHelper类中transmitNotificationOpen方法。将以上代码放进方法if (dartIsReady) { 中。 步骤3:flutter应用,引用本地的源码插件。
运行,搞定。应用到后台,点击通知栏打开前台。
Originally posted by @tangwei5476 in #151 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
2024年12月31日,经测试。这个方法可以再应用后台时,点击通知栏唤起应用到前台。
步骤1:不要通过flutter插件引用,将源码下载到本地。(本人下载的插件版本是 dev-3.x的源码)
步骤2:找到本地下载的源码中,点击通知后的回调方法。JPushHelper类中transmitNotificationOpen方法。将以上代码放进方法if (dartIsReady) { 中。
步骤3:flutter应用,引用本地的源码插件。
运行,搞定。应用到后台,点击通知栏打开前台。
Originally posted by @tangwei5476 in #151 (comment)
The text was updated successfully, but these errors were encountered: