This is not a bug; I am seeking suggestions on how to integrate ads into a React Native project with the following requirements:
I have an infinitely scrollable flat list of feed items, similar to Instagram, where I need to display banner ads at regular intervals.
This involves handling scenarios such as:
If an Ad request succeeds for a specific index - Display the Ad at the index
If an Ad request fails for a specific index - Display the next feed item rather than displaying a Placeholder/Empty view
If an Ad request fails because of timeout error - Display the next feed item
If the index where an Ad should be displayed is scrolled before receiving a successful response for the ad request - Display the next feed item
But if the index where the Ad isn't displayed because of the delayed response should be displayed if the user scrolls up to that index again.
The approach I am thinking of at the moment:
I thought that the solution for the above use cases is to pre-fetch the banner ad view object before displaying it. But, because the Banner Ad is a component in this SDK, I should only be able to load the Ad(make an Ad request) after mounting the component into the screen or flat list. However, with this approach, I wasn't able to handle the failure cases.
But with the above approach, I need to find a way to pre-fetch the banner ad object.
Can you please help me by sharing any better approach you can think of? Or can you please help me with improving my approach to implement this?
This is not a bug; I am seeking suggestions on how to integrate ads into a React Native project with the following requirements:
I have an infinitely scrollable flat list of feed items, similar to Instagram, where I need to display banner ads at regular intervals. This involves handling scenarios such as:
The approach I am thinking of at the moment:
I thought that the solution for the above use cases is to pre-fetch the banner ad view object before displaying it. But, because theBanner
Ad is a component in this SDK, I should only be able to load the Ad(make an Ad request) after mounting the component into the screen or flat list. However, with this approach, I wasn't able to handle the failure cases.But with the above approach, I need to find a way to pre-fetch the banner ad object.
Can you please help me by sharing any better approach you can think of? Or can you please help me with improving my approach to implement this?