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

多进程JActivityManager #3

Open
guider opened this issue May 24, 2016 · 4 comments
Open

多进程JActivityManager #3

guider opened this issue May 24, 2016 · 4 comments

Comments

@guider
Copy link

guider commented May 24, 2016

多进程,多栈的时候JActivityManager getCurrentActivity是否还能使用?

@Jude95
Copy link
Owner

Jude95 commented May 24, 2016

多进程没问题。你在不同进程使用的各个进程的JActivityManager。
多栈也没问题。虽然顺序可能不对了。但毕竟只有一个关闭操作。没有涉及顺序的操作。

@guider
Copy link
Author

guider commented Jun 2, 2016

在Application 中存储是不是更合理一点 ? 在baseActivity的onResume和onPase中调用 set get 方法
private Activity currentActivity;

public Activity getCurrentActivity() {
    return currentActivity;
}

public void setCurrentActivity(Activity currentActivity) {
    this.currentActivity = currentActivity;
}

@Jude95
Copy link
Owner

Jude95 commented Jun 2, 2016

存在哪无所谓。反正目标只是为了不被GC。
后面部分确实应该你这样。我晚上就改。

@guider
Copy link
Author

guider commented Jun 2, 2016

可以加个QQ 沟通沟通吗? 277892183

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