Conversation
Add onclick method and button
Modify scence to have 2 buttons : one to show on top another one to show on bottom
Save MainDemoScence inside assets
update UnityPlayerActivity.java
Add HybidViewViewBridge inside mainDemoScene link button clicks with methods inside mono behaviour class
Remove unused update method
dummy commit
Add HybidBridge and button clicks in the same main scence
fix crash of demo app export new android project with 4 buttons showing add HybidBridge to validate clicking loadHybidAdTop and loadHybidAdBottom
Export new android project inside Android folder
Update gradle and revert UnitPlayerActivity
add ad initialization after app is initialized
Add Location permission in start of application
Add try catch for whole loading method of banner Export new androidlib folder with new configurations Fix looping issue
clean up build files
Update .gitignore
…nity_export_android
Dummy commit
| private void loadBanner(String appToken, final String placementId, int position) { | ||
| final HyBidAdView.Position bannerPosition; | ||
|
|
||
| if (position == getTopPosition()) { |
There was a problem hiding this comment.
can be replaced with ternary operator to shorten
There was a problem hiding this comment.
Cool ,will do this
| HyBid.initialize(appToken, UnityPlayer.currentActivity.getApplication(), new HyBid.InitialisationListener() { | ||
| @Override | ||
| public void onInitialisationFinished(boolean b) { | ||
| hyBidAdView = new HyBidAdView(UnityPlayer.currentActivity); |
There was a problem hiding this comment.
code duplication. You could move it into a separate func and to call it then
There was a problem hiding this comment.
There is only 1 method loadBanner and it is called in all cases
I already did it in last commit
There was a problem hiding this comment.
I was talking about those lines:
hyBidAdView = new HyBidAdView(UnityPlayer.currentActivity);
hyBidAdView.setAdSize(AdSize.SIZE_320x50);
hyBidAdView.load(placementId, bannerPosition, HyBidAdViewWrapper.this);
| private void loadBanner(String appToken, final String placementId, int position) { | ||
| final HyBidAdView.Position bannerPosition; | ||
|
|
||
| if (position == getTopPosition()) { |
There was a problem hiding this comment.
ternary here might be applied
There was a problem hiding this comment.
Cool ,will do this
| HyBid.initialize(appToken, UnityPlayer.currentActivity.getApplication(), new HyBid.InitialisationListener() { | ||
| @Override | ||
| public void onInitialisationFinished(boolean b) { | ||
| hyBidAdView = new HyBidAdView(UnityPlayer.currentActivity); |
There was a problem hiding this comment.
duplication here also with line #96
There was a problem hiding this comment.
Same as above :)
| @@ -8,52 +8,30 @@ public abstract class HyBidAdView : MonoBehaviour | |||
| { | |||
| public string appToken; | |||
| public string placement; | |||
| protected string adID = ""; | |||
There was a problem hiding this comment.
why did you remove listeners?
There was a problem hiding this comment.
Because once ad is loaded ,its callbacks is inside native code and send response to virtual methods inside unity
There was a problem hiding this comment.
I would double check that moment. Those changes might break one of the platform side functionality
| @@ -19,6 +19,8 @@ public HyBidAndroidBanner () | |||
|
|
|||
| public override void Load (int position) | |||
| { | |||
| appToken = "dde3c298b47648459f8ada4a982fa92d"; | |||
There was a problem hiding this comment.
why did you hardcoded appToken and placementID here?
|
|
||
| void Start() | ||
| { | ||
| banner = HyBidAdViewFactory.createHyBidAdView(this); |
There was a problem hiding this comment.
will all your changes break the iOS-ready functionality? Have you checked that?
There was a problem hiding this comment.
I'm creating a merge branch to fix these conflicts. I'll mix the commits and then merge into the PR branch to solve the issues
There was a problem hiding this comment.
the thing is there some point which might not cause conflicts. For example, listeners removal will not cause any conflict, I believe, but can break the functionality
There was a problem hiding this comment.
Yes for sure. I meant conflicts in the functionality in this case. But no worries I'll mix it without breaking the functionality.
Revert all changes of sample to working demo with all banner showing top and bottom
Fix Hybid Demo and validate showing banner