Search Unity

Determining source from where the ad was called from in Android

Discussion in 'Unity Ads & User Acquisition' started by unity_qf0vZ3X51bo_hg, Feb 15, 2018.

  1. unity_qf0vZ3X51bo_hg

    unity_qf0vZ3X51bo_hg

    Joined:
    Jan 24, 2018
    Posts:
    2
    Good afternoon (or morning/evening depending on your timezone and when you read this :) )!

    I was wondering, is there a way to determine what the source of what triggered the ad was (using the same listener object)? For example, you have 2 buttons, the first one to get extra lives and the second to get extra coins. Is there a way to determine what the source was (i.e. is there something we can pass through UnitAds.show(); to determine what the source of the click was), and then do something different in the onUnityAdsFinish method based on where there click came from?

    At face value, it looks like it would be possible to instantiate a different listener for each button, but I'd definitely prefer to have them all within the same listener if possible.

    For reference, I'm implementing Unity Ads through Android.

    Thanks in advance for any help with this!
     
  2. Callie-Zhu

    Callie-Zhu

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    42