简体   繁体   中英

Fresh loading activity every time of calling it

In an android App im showing advertisement from a local advertisement company.

My problem is when start App and close it with back button, and back to it by clicking on its icon, i see the same Ad. But when i close the app from android task manager and back to the app, i see another Ad.

I know this can have multiple reasons and my question is not clear, But my main questions that how i can set each activity runs like first time of running the app? What should cause this reaction? its like a cookie system... i want every activity show new Ad!

Here you can see example code: http://github.com/adad-project/client-app-sample

Move

Adad.initialize(getApplicationContext());
((AdView) findViewById(R.id.banner_ad_view)).setAdListener(mAdListener);

to onStart and remove from onCreate in MainActivity

Do similar thing in other activities.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM