-
Notifications
You must be signed in to change notification settings - Fork 0
Temp/testing unity export android #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be replaced with ternary operator to shorten
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code duplication. You could move it into a separate func and to call it then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ternary here might be applied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplication here also with line #96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you remove listeners?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you hardcoded appToken and placementID here?
|
|
||
| void Start() | ||
| { | ||
| banner = HyBidAdViewFactory.createHyBidAdView(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will all your changes break the iOS-ready functionality? Have you checked that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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