[MOD-2497] AdMob: Parity between Android and iOS
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | None |
| Status | In Review |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Admob |
| Labels | n/a |
| Reporter | Jan Vennemann |
| Assignee | Yordan Banev |
| Created | 2019-02-22T16:00:22.000+0000 |
| Updated | 2020-06-02T07:11:47.000+0000 |
Description
The iOS Swift rewrite in MOD-2495 already addresses a few parity issues between Android and iOS. This ticket is for changes required in the Android version of the module.
Parity issues that need to be addressed:
For the module proxy:
* Add
AD_SIZE_* constants
* New method initialize to initialize the Google Ads SDK
* Add debugIdentifiers property (see https://developers.google.com/admob/android/test-ads#enable_test_devices). This should replace requestTestAd from the banner view proxy.
* Deprecate createView and replace with createBannerView
* Remove Facebook audience framework. Not sure if this is possible on Android. We currently ship this by default for Facebook mediation. However i would like to remove it and users have to manually add it the their Project if they want to use it.. Should be easily done by just dropping it into a project's platform folder. There is no code setup necessary.
* I would like to replace set/get tagForUnderAgeOfConsent with property isTaggedForUnderAgeOfConsent. In Swift this can be done with computed properties. Is this possible on Android?
Banner view proxy:
* Deprecate loadAd and requestAd and replace with load
* Deprecate requestTestAd
* Deprecate additional properties like prop_color_bg etc. Ad request customization should now be done via load
* Add support for adSize option to specify the banner size. This is currently hardcoded to AdSize.Banner.
* Remove deprecated properties testing and publisherId (Not sure for how long those are deprecated so maybe this needs to be done later)
Interstitial Ad:
* Add options for request customization to load
* On iOS the proxy can be reused and a new interstitial ad is created each time "load" is called. Can we do the same on Android?
General:
* Deprecate the event name constants and just use strings. I don't think we can actually deprecate them in the code so we just need to add a note in the docs. New event names for banner and insterstials would be:
** ad_received => load
** ad_not_received => fail
** ad_closed => close
** ad_opened => open
** ad_left_application => leftapp
PR: https://github.com/appcelerator-modules/ti.admob/pull/88