Android - clickthrough with in-app web browser ?

274 views
Skip to first unread message

Stephen Burns

unread,
Nov 20, 2013, 10:35:00 PM11/20/13
to ima...@googlegroups.com
Is it possible on Android to configure clickthrough to use an in-app browser (WebView)  similar to iOS ?

Thanks

Shawn Busolits (IMA SDK Team)

unread,
Nov 21, 2013, 10:15:09 AM11/21/13
to ima...@googlegroups.com
Hey Stephen,

Currently the Android SDK does not support this feature. We fire an intent with the click-through URL that will be sent to the user's default browser.

Thanks,
Shawn Busolits
IMA SDK Team

Stephen Burns

unread,
Nov 22, 2013, 9:03:36 AM11/22/13
to ima...@googlegroups.com
Thanks Shawn
My client is keen to have consistency between iOS and Android platforms so I was wondering if this was on the roadmap for Android and if so, when?

One of the driving forces for this is because when you leave the app (after clickthrough) then it is harder to return to the app, and then when you do, the app can get confused as to what it should do at this point in terms of handling the events.
iOS implementation seems to handle this very well when using in-app browser (which is what we have done) but has similar issues when not configured this way. 

thanks
Stephen

Shawn Busolits (IMA SDK Team)

unread,
Nov 22, 2013, 3:46:43 PM11/22/13
to ima...@googlegroups.com
Hey Stephen,

We do have this on our roadmap, but we don't have any timeframe as of now. If you're seeing unexpected behavior from the SDK when exiting and returning to an app let us know.

Thanks,
Shawn Busolits
IMA SDK Team

Vinayak ™

unread,
Mar 31, 2016, 4:47:03 PM3/31/16
to Interactive Media Ads SDK
Hi Stephen,

When user taps on "Learn More", the IMA ADK issues AdEvent CLICKED followed by PAUSED. But when the user returns back to the app there is no AdEvent raised by the SDK to resume the Ad. I registered for the ActivityLifecycleCallbacks and tried AdsManager.resume, but this restarts the ad from the beginning rather than resuming it from where it is.

Also is there any way in SDK to capture the clickthrough event to get the URL so that it can be loaded within the app than navigating to external browser?

Vu Chau (IMA SDK Team)

unread,
Apr 1, 2016, 10:37:32 AM4/1/16
to Interactive Media Ads SDK
Hi Vinayak,

The SDK does dispatch RESUMED to resume the ad when you are back from "Learn More".  Are you seeing it not resume in our sample app?  Are you on the latest SDK version?

We obfuscated the API call that supports getting the clickthrough URL.  And currently we don't support handling the clickthrough URL within the app.  It will always trigger the external browser.

Vu Chau
IMA SDK Team

V!nayak

unread,
Apr 1, 2016, 11:35:33 AM4/1/16
to ima...@googlegroups.com
Thanks Vu, I am using the latest SDK (i.e 3.1.3). I'm pretty sure that the AdEvent "RESUMED" never get triggered on returning to the app. If I do it using the ActivityLifecycleCallbacks - onActivityResumed, then the ad starts from the beginning.

--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ima-sdk/tmz4mh7iRxg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Vinayak

Vu Chau (IMA SDK Team)

unread,
Apr 1, 2016, 12:29:25 PM4/1/16
to Interactive Media Ads SDK
Hi Vinayak,

I have again verified - the SDK does fire RESUMED when you are back from "Learn More".  You can see it in our sample project.  You wouldn't have to manually handle that via the activity's lifecycle callbacks at all.

Let us know if you can reproduce the issue (not seeing RESUMED) in our sample project.  If not, tell us how your implementation is, and with which tag you are using.

Vu Chau
IMA SDK Team

V!nayak

unread,
Apr 4, 2016, 11:25:51 AM4/4/16
to ima...@googlegroups.com
Hi Vu,
Yes, I checked the sample project and it does trigger the PAUSE and RESUMED events. But not sure for some reason it doesn't trigger in our implementation even though I've used the same controller and ad playback logic. 

Thanks for your support.

Vu Chau (IMA SDK Team)

unread,
Apr 4, 2016, 12:13:18 PM4/4/16
to Interactive Media Ads SDK
Hi Vinayak,

Feel free to send us some sample implementation code (with the ad tag) you have and we'll be happy to take a look!

Vu Chau
IMA SDK Team

V!nayak

unread,
Apr 5, 2016, 5:39:29 PM4/5/16
to ima...@googlegroups.com
Hi Vu,
Please find attached the raw implementation code.

ImplementationDetails.java
Message has been deleted

Veer Arjun Busani

unread,
Apr 6, 2016, 10:32:49 AM4/6/16
to Interactive Media Ads SDK
Hi Vinayak,

Thank you for the code snippet. While your implementation of the IMA SDK looks about right, I do have reservations as to why you are doing this on a background thread. Do remove this bit and make implementation stick to the main UI thread. Let us know if that fixes the issue. If not, do send me your XML layout and the implementation code of the video player. 

Thanks,
Veer Busani
IMA SDK Team

V!nayak

unread,
Apr 7, 2016, 2:43:21 PM4/7/16
to ima...@googlegroups.com
Hi Veer,
Thanks for reviewing our implementation. In our implementation the initialization and request of ad isn't actually on background thread, you can see its using context.getMainLooper() which runs in the main thread of the application. Since we are inflating the view, we need to do it on main thread and also the mSdkFactory.createAdsLoader has to be called on main thread. Our video player is implemented on Exoplayer and it resides in another module and based on its playback delegate events we trigger the ad request. Please find enclosed the xml layouts.

Thanks,
ima_ad_view.xml
videoplayerview.xml

V!nayak

unread,
Apr 7, 2016, 3:02:15 PM4/7/16
to ima...@googlegroups.com
Follow up

I am wondering if the CLICKED and PAUSED events are firing that means the events are registered,but not sure what is stoping AdEvent to raise RESUMED event.
--
Regards,
Vinayak

V!nayak

unread,
Apr 7, 2016, 3:56:00 PM4/7/16
to ima...@googlegroups.com
Follow up..

Hi Veer,
If in case it may help. Below is the event sequence from Our App and the IMA Sample App

**************** Our App **************** 

IN AD Event :  AD_BREAK_READY
In VideoAdPlayer removeCallback()
IN AD Event :  LOADED
In VideoAdPlayer addCallback()
IN AD Event :  CONTENT_PAUSE_REQUESTED
In VideoAdPlayer loadAd()
In VideoAdPlayer playAd()
In VideoPlayer.PlayerCallback onPlay() - mIsAdDisplayed = true
IN AD Event :  STARTED
In VideoAdPlayer pauseAd()
In VideoPlayer.PlayerCallback onPause() - mIsAdDisplayed = true
IN AD Event :  CLICKED
IN AD Event :  PAUSED


**************** IMA Sample App **************** 

IN AD Event :  LOADED
IN AD Event :  CONTENT_PAUSE_REQUESTED
In VideoAdPlayer loadAd()
In VideoAdPlayer addCallback()
In VideoAdPlayer playAd()
In VideoPlayer.PlayerCallback() onPlay() - mIsAdDisplayed = true
IN AD Event :  STARTED
In VideoAdPlayer pauseAd()
In VideoPlayer.PlayerCallback() onPause() - mIsAdDisplayed = true
IN AD Event :  CLICKED
IN AD Event :  PAUSED
In VideoAdPlayer pauseAd()
In VideoPlayer.PlayerCallback() onPause() - mIsAdDisplayed = true
IN AD Event :  PAUSED
In VideoAdPlayer playAd()
In VideoPlayer.PlayerCallback() onResume() - mIsAdDisplayed = true
IN AD Event :  RESUMED

--
Regards,
Vinayak

Veer Arjun Busani

unread,
Apr 7, 2016, 5:05:42 PM4/7/16
to Interactive Media Ads SDK
Hi Vinayak,

This is what I would suggest in your case -
  • You are extending the Application to get callbacks for all of your ActivityLifeCycles. I'm curious as to whether there is anything off balance that you might be having in overriding onPause() and onResume(). This is interesting as when you are manually resuming the content, the IMA SDK is able to catch this but thinks it is a new AdRequest. Have you tried to listen to the callbacks when this happens? Do you see AD_BREAK_READY event being fired in that case?
  • Next is the issue with Background thread. Is there is any reason for you to use getMainLooper() while making these AdRequests? I would assume that you are running on a background thread and trying to queue these requests on the main thread. Now if that is the case, what is it that you are trying to do on the background thread? You do not have to specify to run on the main thread if that's not the case.
  • Also comes the ExxoPlayer. There are certain issues to it and also certain workarounds as well. I have personally never used an ExxoPlayer to fire up Ads using IMA SDK and I would like to know whether this issue is happening due to the this particular player or while using the regular MediaPlayer as well.
  • Finally, it would be very essential for us to be able to reproduce the issue and I would want you to send us a sample app. If you are able to send us a sample app, even privately if you want to, then we would be able to pinpoint the issue.

Thanks,
Veer Busani
IMA SDK Team

Reply all
Reply to author
Forward
0 new messages