Skip to content
New issue

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

Tip:AgentWeb所在Activity被配置独立进程时,下载通知栏取消任务无效解决方案 #294

Closed
AzureFatty opened this issue Mar 30, 2018 · 1 comment

Comments

@AzureFatty
Copy link

现象:
AgentWeb所在的Activity在AndroidManifest中被配置独立进程时(例: android:process=":Browser"),进行下载任务时,单击取消按钮会出现无法取消下载任务的情况。

分析:
此情况的原因是由于NotificationCompat.Builder.setDeleteIntent()方法注册广播接收者时候所发出的广播为
LocalBroadcastManager。因此造成了com.just.agentweb.download.NotificationCancelReceiver(因未配置与AgentWeb相同进程)无法收取到广播。

解决方法:
在宿主应用的AndroidManifest进行以下配置

<receiver
            android:name="com.just.agentweb.download.NotificationCancelReceiver"
            android:process=":Browser"
            tools:replace="android:process" />

给遇到此问题的同学一个提醒。

@Justson 建议在README/WIKI进行一下说明。

@Justson
Copy link
Owner

Justson commented Mar 31, 2018

Thanks

@Justson Justson closed this as completed Mar 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants