Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Setting orientation of Ads (Interstitial / Rewarded) on Android

Discussion in 'Unity Ads & User Acquisition' started by ardovic, Oct 1, 2019.

  1. ardovic

    ardovic

    Joined:
    Oct 1, 2019
    Posts:
    1
    Hello,

    I'm integrating Unity Ads into my game app (build with Android SDK, not Unity, though I still want to use the unity Ads SDK for a reason).

    My app has a special orientation situation going on, I'll try to explain here, but you can also check it yourself if you want to (https://play.google.com/store/apps/details?id=com.solitaire.klondike.smart). Anyways, here is the deal:

    The orientation is set to portrait in AndroidManifest.xml, but I use Sensor API and change game stuff according to users current device holding position, in other words I manage game orientation manually.

    The problem is with the ads, I can use AdMob only when user is in portrait mode (since the game is in portrait mode for the system at all times). But I would like to let the user have a good experience with ads in any orientation (including reversed portrait and landscape both saides). I've read that Unity Ads are more flexible, and I can run them in landscape mode even if the app is in portrait.

    For this, I would like to know how can I FORCE the ad (let's say rewarded Unity video ad) to look exactly the way I want it to, in accordance with users REAL orientation.

    Previously, I implemented 'native' ads from AdMob and was rotating the View for the user, but it was not so polished and not very effective, so I removed it after a while.

    Would really appreciate if someone gave me a method or something I could use in the Unity Ads SDK for Android to achive my goal.

    Thanks in advance,
    Serj Ardovic
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Unfortunately, there is no API available that would allow you to choose the orientation of the ads that are shown. That said, Unity Ads does attempt to use the current device orientation when displaying the ad to users, so it still might be an option for you. I'm not 100% sure how it works when you have locked the apps orientation though.