I have running application and i want to impliment ads in this app, ads are java based (not xml banner), i am using airpush and appflood ads. What my application do as follows : application is to hide user's sdcard data, so definitly application has login screen, when user will press HOME button application will go in background and coming back to forground will ask user to login again. Everything is workinig absolutly fine. What i am doing to ask for login again is while pressing home button call onPuase of that current activity and i am storing in local preference that application has been paused so it should ask for login when it comes to foreground.
Now the real problem comes when I implemented ads in this app
the problem is that when application start showing ads , my current activity Paused (onPuased called) and canceling ads ask user to login again which is not good according to the UX, so what I need is to show ads but never ask for login again but when user will press home button it should ask to login again