mopub/mopub-client — pull request #76 by neilthorne (2012-11-02 16:57:39+00:00)
Title: Fixes for download app, mp4 video and early close of mraid views after one interaction in an expanded view.

after trying to get the Android SDK to work with video and apps on 1.7, 1.8 and 1.9 - I also tried your very latest release 1.9.0.5 which also didn't work.

We've got a lot of experience with SDKs (we've built two ourselves) so I had a look at the code and I've got some fixes for you if your development team would like to take a look.

They're certainly not perfect but there were four separate issues I was seeing that are now all fixed -

1. Embedded/MRAID browser collapsing after just one interaction. This was happening because the activity was being asked to finish after each interaction which was closing the embedded browser. I've removed this line and this stops happening.

2. Embedded/MRAID browser does not support video. Here I've added a suffix rule to your embedded browser URL rule list. You already try and handle 'app related' URLs using a list of URL prefixes, but this doesn't catch a .mp4 video URL, so I just added in a suffix rule that looks for .mp4 extensions and makes sure they are not handled by the embedded browser, but by the native player.

3. Expandables do not support Video.
4. Expandables do not support Apps.

For both of these I noticed that your MraidBrowserController does not apply the same URL handling logic as the MraidBrowser (embedded browser).
In the controller I've copied the code that handles 'app-related' URLs from the MraidBrowser into the MraidBrowserController and now expandables support mp4 video and apps too.