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

How to support multi-process? #79

Open
Krosxx opened this issue Dec 18, 2020 · 4 comments
Open

How to support multi-process? #79

Krosxx opened this issue Dec 18, 2020 · 4 comments

Comments

@Krosxx
Copy link

Krosxx commented Dec 18, 2020

        <activity
            android:name=".XXXXActivity"
            android:process=":pocess2"/>

GodEye 无法监控到pocess2进程的XXXXActivity的生命周期及其他信息,请问如何支持

@Kyson
Copy link
Owner

Kyson commented Dec 21, 2020

子进程的话可以使用多个GodEye的实例,相当于每个进程都是一个app,不过每个进程的端口需要自己指定不同的

@Krosxx
Copy link
Author

Krosxx commented Dec 21, 2020

@Kyson 嗯嗯,我后来在Application中其他进程开启了,不过有个问题GodEye.init(Context)是私有方法,使用反射才能创建成功。
这里建议GodEye初始化用的ContentProvider指定可多进程android:multiprocess="true",或可配置是否支持多进程,并且端口自增或其他策略

@Krosxx
Copy link
Author

Krosxx commented Dec 21, 2020

另外支持多进程还需解决前台服务通知id

@Kyson
Copy link
Owner

Kyson commented Dec 22, 2020

这个可以考虑一下,因为现在大部分情况是主进程的监控,所以子进程的没有过多考虑进来

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