Wednesday, 7 August 2013

Android activity onPause() method

Android activity onPause() method

In my current project, I have an activity named as CalendarView.java and
an another launcher activity named as FirstScreenActivity.java which
should always appear whenever user press home button/back button from
Calendar.java. I also added interstitial ads in FirstScreenActivity.java.
Now, My problem is when I start CalendarView.java and ads appears,
activity goes in onPause() state, now when I cancel those ads and comes
back on CalendarView.java activity comes in onResume() state. Here I don't
want my activity to finish in onPause() method, but I also want that is
I'm pressing home button and then come back FirstScreenActivity.java
should open.
Now What I want is, when I click home button in CalendarView.java and
restart the project FirstScreen.java should appear, and when ads appear in
Calendar.java and user close the ads then user should remains on
CalendarView.java only.
Any positive response will be highly appreciated.

No comments:

Post a Comment