Interstitial restarts activity

209 views
Skip to first unread message

Michal

unread,
Jan 8, 2015, 12:13:01 AM1/8/15
to google-adm...@googlegroups.com
Hello,

I've got report from user that after showing interstitial app is restarted. I never managed to reproduce such situation. Also no one else reported it, so i think it's some unusual situation (my app shouldn't be resource demanding).

Does it happen to anyone of you? Anyone is able to reproduce it?

Is it problem with our apps or admob sdk? How can we handle such situation?

Thanks

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Jan 8, 2015, 1:20:38 PM1/8/15
to google-adm...@googlegroups.com
I've not heard of that particular behavior taking place in an app using AdMob's interstitials. If you are able to get a stack trace from the application when the restart takes place, or have reproducible steps to cause it to happen, please let us know.

Thanks!

-Andrew

Michal

unread,
Jan 9, 2015, 2:28:18 PM1/9/15
to google-adm...@googlegroups.com
Hello,

Unfortunately i wasn't able to reproduce it, but i was able to simulate it. I used "Do not keep activities" option in android development options. That way everytime after interstitial is shown, calling activity is destroyed and launched again. 100% of times.

I understand it in such way - interstitial ad is implemented as another activity. So my game/app is activity A and it starts activity B (with interstitial). It's natural in android that in such situation activity A may be destroyed. And there's no way to control it. So there must be situations (probably not very often) that it happens.

I guess it happens very rarely (probably less than 0.1% of users) and probably only on phones which are overloaded by some background services, apps etc. My user reported it happens on phone which has more ram and better cpu than phone i'm using for test. So it's not a matter of specification.

Thanks

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Jan 9, 2015, 5:52:41 PM1/9/15
to google-adm...@googlegroups.com
In your initial post you described the app itself restarting rather than an activity.  I'm guessing that your main activity is getting destroyed in both scenarios (yours and the user's), and so your app must rebuild it from scratch, which for many apps is functionally identical to a restart.

If you've only seen this issue on one device, for one user, there must be something causing it to destroy the activity -- either that user has the same option turned on, or there's something else consuming a large amount of resources.

-Andrew

William Ferguson

unread,
Jan 11, 2015, 8:23:54 AM1/11/15
to google-adm...@googlegroups.com
Your Activities should be designed to handle being killed off and then resuming later. This is a standard part of the Android framework.

Look at Fragment/Activity #onSaveInstanceState.

William
Reply all
Reply to author
Forward
0 new messages