Upgrade Instructions

Upgrade from 5.0+ to 6.0.2

If you are upgrading from your current HyprMX 5.0+ integration to the HyprMX 6.0.2 SDK, follow the instructions below.

1. Remove the hyprmx maven url in the top level build.gradle file. HyprMX is now distributed with Maven Central.

2. Update HyprMX dependency in the app's build.gradle file:

1
dependencies {
2
implementation 'com.hyprmx.android:HyprMX-SDK:6.0.2'
3
}
Copied!

3. If you are using Kotlin in your application, add the following to your build.gradle inside the android block:

1
kotlinOptions {
2
jvmTarget = "1.8"
3
freeCompilerArgs = [
4
"-Xjvm-default=compatibility",
5
]
6
}
Copied!
4. Optional: Age Restricted User on Initializer
The initializer includes an optional ageRestrictedUser parameter. If the user is under the age of 16, set this parameter to true.
Setting the ageRestrictedUser parameter is recommended for all users within applications that participate in Google Play’s Designed for Families program, are listed in Google Play’s Family section, or include children as one of the target audiences to prevent access to the AAID for end-users flagged as children.
It is the responsibility of the app developer to ensure compliance with all Google Play Family Policies, including, and not limited to, Designing Apps for Children and Families.
Java
Kotlin
1
String distributorID = "Your Distributor ID";
2
String userID = "Your User's ID";
3
ConsentStatus consentStatus = ConsentStatus.CONSENT_STATUS_UNKNOWN; // If you don't have consent status for the user, set this to CONSENT_STATUS_UNKNOWN
4
HyprMXIf.HyprMXInitializationListener initializationListener;
5
boolean ageRestrictedUser = true; // Set this to true if the user is under 16
6
// Use this initializer if your app's target audience includes children.
7
HyprMX.INSTANCE.initialize(this, distributorID, userID, consentStatus, ageRestrictedUser, initializationListener);
Copied!
1
val distributorID = "Your Distributor ID"
2
val userID = "Your User's ID"
3
val consentStatus = ConsentStatus.CONSENT_STATUS_UNKNOWN // If you don't have consent status for the user, set this to CONSENT_STATUS_UNKNOWN
4
val initializationListener: HyprMXIf.HyprMXInitializationListener = this
5
val ageRestrictedUser = true // Set this to true if the user is under 16
6
// Use this initializer if your app's target audience includes children.
7
HyprMX.initialize(this, distributorID, userID, consentStatus, ageRestrictedUser, initializationListener)
Copied!

5. Optional: Implement the PlacementListener.onAdExpired() method

1
@Override
2
public void onAdExpired(Placement placement) {
3
// Called when an ad is no longer available for the given placement.
4
}
Copied!
That's it! You're up and running with the latest version of the HyprMX SDK.

License

By integrating the HyprMX SDK, you are agreeing to the End User License Agreement.