Android
Add the Hive SDK functionality to the Gradle file in the form of an external library. The external library exists in a remote repository. The version of the external library is automatically set to match the current version of the Hive SDK. If you update the Hive SDK version, the external library version is also automatically updated.
Add the external library corresponding to the Hive SDK functionality to be used in the module-level build.gradle file. Below is an example of build.gradle. Here, we guide you through using only Google authentication and Google Play Store payment functionality as an example.
dependencies {
// Authentication (AuthV4)
// Use Google IdP login
implementation "com.com2us.android.hive:hive-authv4-provider-google-signin"
// Use Google Play Store purchases
implementation "com.com2us.android.hive:hive-iapv4-market-google"
}
Below is the entire example of the module-level build.gradle file when the above libraries are added.
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
// Hive SDK BOM ex: 23.0.0
implementation(platform("com.com2us.android.hive:hive-sdk-bom:${project.HIVE_SDK_VERSION}"))
// Hive SDK
implementation "com.com2us.android.hive:hive-sdk"
// Used for Google Install Referrer tracking
implementation "com.android.installreferrer:installreferrer"
// Authentication (AuthV4)
// Use Google IdP login
implementation "com.com2us.android.hive:hive-authv4-provider-google-signin"
// Use Google Play Store purchases
implementation "com.com2us.android.hive:hive-iapv4-market-google"
}
Note
The Guest Sign-in feature in the authentication functionality can be used without adding an external library.
Info
For detailed information on each Hive SDK functionality (authentication, billing, notification, etc.), please refer to the respective feature guides.