开发者

How can i know current foreground activity(not from service)?

I am having alert generation application. I want to start or switch to other(Third) activity from current activity(foreground) using another activity's context(middle). From current activity(foreground) i m switching to other(middle) activity using intents and from this switched activity again i m switching to another(third) activity using intents. Due to such scenario, i am getting li开发者_如何学编程ttle but flash of middle activity in between current foreground activity and final most(third) activity. How can i resolve this one?

For this purpose i want to know current foreground activity or is there any other solution?

I am not having any ideas about this one. Highly appreciate solutions.

Thanks in advance


Current activity context can be obtained in the following simple way.

            Context currentContext=this;

hope it solves your question.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜