Hi Eric,
I really appreciate you getting back so quickly.
The route you're suggesting is the one that I was exploring first as it seems simpler than lobbying for a feature to be revealed in the API :)
Unfortunately pulling the data from the creative as it's being displayed is too late... We're trying to find out, prior to showing a cached interstitial, if the ad is still valid to show according to the targeting set in DFP. For example, if the ad is only meant to show in the mornings or if it is meant to end by a certain date. A cached interstitial might no longer be valid by the time we want to show it. And my understanding is that you can only fire app events from the creative as it's displayed on screen rather than when it's loaded or loading into cache.
If we could access the lineItemId we could pull the information we require from the LineItemService in the
DFP API
I'm hoping that our use case (showing splash interstitial ads cached from previous session on app startup) isn't so edge case that you wouldn't consider adding a solution to our problem. Which could be one of the following:
- exposing the X-Afma-Debug-Dialog header information in the google mobile ads sdk. And leave it up to us to get the info we need from the DFP API
- Sending the "maximum TTL" for an ad in the response for the ad request in another http header such as "X-Afma-Interstitial-Max-TTL". The sdk could have a method isValid() (similar to the isReady()) call that uses the timeout sent in the initial call to see if it's safe to display the ad. [The main thing achieved here is avoiding any http requests after the initial ad request so that there's no user lag]. I noticed there there appears to be a reference to a X-Afma-Interstitial-Timeout" in the SDK, but I think this is something to do with loading timeouts. (Which is something we're trying to avoid entirely with the caching)
I understand that this may not be an issue for many people in which case we will need to look down the route of staying with our current ad server for serving our interstitials (or even writing our own library so that we can server via the DFP Http serving endpoint)
Do you think a solution for our problem might get added in future? Or else if there a work around that we have not considered.
Once again, your help is hugely appreciated.
All the best,
Brian