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

需要调用两次startActivity才能启动插件activity #296

Open
balizhuang2012 opened this issue Dec 26, 2016 · 2 comments
Open

需要调用两次startActivity才能启动插件activity #296

balizhuang2012 opened this issue Dec 26, 2016 · 2 comments

Comments

@balizhuang2012
Copy link

在4.2、4.3手机上必现。
现象是,第一次调startActivity(),会停在“加载ing”那个画面。必需第2次调startActivity(),才能出现插件的界面。
原因:第一次调startActivity()的时候,PluginCallbackHook未被enabled。而第2次调startActivity()的时候,由于PluginHelper.onServiceConnected()被调用到了,所以PluginCallbackHook被enabled了,所以成功了。
第一次调startActivity()的时候,,PluginCallbackHook未被enabled的原因是:PluginProcessManager.isPluginProcess()返回false(期望为true)。此时由于packagemanager 未被hook上,所以sCurrentProcessName为com.xx.xx:PluginP00x,所以返回false了。
表述得不是很清楚,麻烦帮忙看看,不知道是不是我的用法不正确?指正一下吧:)

@haimo-free
Copy link

2.为什么我集成后,奇数次可以打开,偶数次就打不开了?
答:请按照文档中修改PluginManager.STUB_AUTHORITY_NAME="com.example.droidplugin_stub"的值。

@TIIEHenry
Copy link

小白请教一下,那该怎么改

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

3 participants