Determining source from where the ad was called from in Android

Good afternoon (or morning/evening depending on your timezone and when you read this :slight_smile: )!

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!

Hi @unity_qf0vZ3X51bo_hg , Thanks for writing.

You can implement this by passing the placementId parameter into show and onUnityAdsFinish method.

For more information please kindly check here: GitHub - Unity-Technologies/unity-ads-android: Unity Ads SDK for Android