开发者

How to bring my application activity if another application is in visible?

Consider am having 2 applications named first and second. The first applications has activity A the second applications has activity B. Initially Activity A of first application is launched and later second application will be launched from the activity A of the first application. Activity A of the first application has a count down timer. Once the timer hits How can i bring the activity A, being the application second开发者_Python百科 is in visible ?

Thanks in advance.


Are you sure you need them to be different applications? Couldn't they just be activities in the same applications?

That said, you could just use an intent and start your activity that has an intent-filter for that intent?


hi try something like below code

final Intent intent = new Intent(Intent.ACTION_MAIN, null);
                    intent.addCategory(Intent.CATEGORY_LAUNCHER);
                    final ComponentName cn = new ComponentName("com.urbanairship.airmail", "com.urbanairship.airmail.MainListActivity");
                    intent.setComponent(cn);
                    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    startActivity( intent);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜