Skip to content

MET-5021: Update Unity Plugin to support Android SDK 2.0 - #96

Merged
antonurankar-moloco merged 52 commits into
developfrom
tomi-unity_bridge
Oct 17, 2025
Merged

MET-5021: Update Unity Plugin to support Android SDK 2.0#96
antonurankar-moloco merged 52 commits into
developfrom
tomi-unity_bridge

Conversation

@antonurankar-moloco

@antonurankar-moloco antonurankar-moloco commented Oct 12, 2025

Copy link
Copy Markdown
Contributor

This PR updates the Metica Unity Plugin to support the Android SDK 2.0 release, bringing the plugin version from 1.13.5 to 2.0.0-beta1.

Key Changes

SDK Architecture Refactoring

  • Restructured the SDK to use a static API pattern with nested classes for better organization (MeticaSdk.Offers, MeticaSdk.SmartConfig, MeticaSdk.Events, MeticaSdk.Ads)
  • Moved from instance-based to static SDK initialization pattern
  • Updated namespace from Metica.Unity to Metica.SDK.Unity for better consistency

Android Integration Updates

  • Updated Android dependency to com.metica:metica-sdk:2.0.0-beta1
  • Modified initialization flow to support new Smart Floors feature with trial/holdout group assignment
  • Removed MeticaAdsExternalTracker class references as this functionality has been internalized
  • Updated callback interfaces to match Android SDK 2.0 patterns

Configuration Changes

  • Renamed SdkConfig to MeticaConfiguration with simplified structure
  • Replaced SdkConfigProvider with MeticaConfigProvider
  • Added support for custom API keys through CustomKeys field

API Improvements

  • Simplified ad unit ID handling - now passed directly to methods instead of relying on global state
  • Updated initialization to return MeticaInitializationResult with improved assignment status handling
  • Introduced MeticaUserGroup enum replacing the deprecated MeticaAdsAssignmentStatus

Breaking Changes

  • All SDK methods now use static access pattern
  • Configuration structure has changed significantly
  • Ad methods now require explicit ad unit IDs
  • Namespace changes will require updates to existing integrations

Note on Publisher-Facing API

The publisher-facing API improvements are minimal and will be addressed in a follow-up PR. This PR focuses on maintaining compatibility with the Android SDK 2.0 while keeping the existing Unity integration patterns largely intact.

rstecca-metica and others added 30 commits September 30, 2025 14:59
…ment has started. Taking steps towards the new API design.

- `Metica.Unity` is no more.
- `Metica.SDK` now depends on `Metica.ADS`
- `Metica.ADS` does NOT depend on `Metica.SDK` anymore.
- `MeticaSdk` now initializes `MeticaAds` too.
- `MaxSdk` still needs app-level initialization (aka up to the user).
…egistering) services at initialization phase.
    {
        // TODO: currently we force trial user group
        _tcs.SetResult(
            new MeticaInitializationResult(MeticaAdsAssignmentStatus.Normal)
        );
        /*
- Move `ILog` to `Metica.Core`
- Substitute all calls to `UnityEngine.Debug.Log` (in `Metica.ADS` classes) with `MeticaAds.Log.LogDebug` (yes... not the nicest call)
@antonurankar-moloco
antonurankar-moloco changed the base branch from main to develop October 12, 2025 07:46
@antonurankar-moloco
antonurankar-moloco changed the base branch from develop to experimental/MET-4221 October 12, 2025 07:47
rstecca-metica and others added 8 commits October 13, 2025 10:04
# Conflicts:
#	Runtime/ADS/Platform/Android/AndroidDelegate.cs
#	Runtime/ADS/Platform/Android/AndroidJavaObjectExtensions.cs
#	Runtime/ADS/Platform/Android/InitCallbackProxy.cs
@antonurankar-moloco
antonurankar-moloco changed the base branch from experimental/MET-4221 to develop October 14, 2025 19:18
# Conflicts:
#	Assets/Plugins/Android/mainTemplate.gradle
#	Assets/StreamingAssets/Metica/sdkInfo.json
Merge branch 'develop' into tomi-unity_bridge

# Conflicts:
#	Editor/MeticaAdsDependencies.xml
#	Runtime/ADS/Metica.ADS.asmdef
#	Runtime/ADS/MeticaAds.cs
#	Runtime/ADS/Platform/Android/AndroidDelegate.cs
#	Runtime/ADS/Platform/Android/BannerCallbackProxy.cs
#	Runtime/ADS/Platform/Android/InitializeCallbackProxy.cs
#	Runtime/ADS/Platform/Android/LoadCallbackProxy.cs
#	Runtime/ADS/Platform/UnityPlayer/UnityPlayerDelegate.cs
#	Runtime/SDK/MeticaSdk.cs
#	Runtime/SDK/SdkConfig.cs
#	package.json
@antonurankar-moloco antonurankar-moloco changed the title Tomi unity bridge MET-5021: Prepare Unity Plugin for 2.0 release Oct 15, 2025
@antonurankar-moloco antonurankar-moloco changed the title MET-5021: Prepare Unity Plugin for 2.0 release MET-5021: Update Unity Plugin to support Android SDK 2.0 Oct 15, 2025
@antonurankar-moloco
antonurankar-moloco marked this pull request as ready for review October 15, 2025 06:59
@antonurankar-moloco antonurankar-moloco self-assigned this Oct 15, 2025
@antonurankar-moloco
antonurankar-moloco merged commit 4b630c2 into develop Oct 17, 2025
@antonurankar-moloco
antonurankar-moloco deleted the tomi-unity_bridge branch October 17, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants