Skip to content

Companion ads don't show when targeting API 29 #6432

@AlienAsRoger

Description

@AlienAsRoger

[REQUIRED] Use case description

Provide and example with Companion Ad integration.

Current code have

    /**
     * Sets the slots for displaying companion ads. Individual slots can be created using {@link
     * ImaSdkFactory#createCompanionAdSlot()}.
     *
     * @param companionSlots Slots for displaying companion ads.
     * @see AdDisplayContainer#setCompanionSlots(Collection)
     * @deprecated Use {@code getAdDisplayContainer().setCompanionSlots(...)}.
     */
    @Deprecated
    public void setCompanionSlots(Collection<CompanionAdSlot> companionSlots) {
        adDisplayContainer.setCompanionSlots(companionSlots);
    }

But there is no implementation example. Having Companion Ad integration would help us debug and troubleshoot any issues when it doesn't work on our clients.

Proposed solution

Currently we have in our client code this part

        CompanionAdView companionAdView = companionProvider.getCompanionAdView();
        // Set up spots for companions.
        CompanionAdSlot companionAdSlot = imaFactory.createCompanionAdSlot();
        companionAdSlot.setContainer(companionAdView.getCompanionViewGroup());
        companionAdSlot.setSize(companionAdView.getWidth(), companionAdView.getHeight());

        ArrayList<CompanionAdSlot> companionAdSlots = new ArrayList<>();
        companionAdSlots.add(companionAdSlot);
        adDisplayContainer.setCompanionSlots(companionAdSlots);

Recent update to targetSdk 29 made it impossible to display companion banner( it's shown as blank white). So we were hoping to compare with ExoPlayer IMA integration and check if it's something on our side.

Alternatives considered

I can't think of any alternative solutions.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions