Getting started
Last updated
Last updated
This documentation will guide you through all the steps needed to display Ogury ads on the Android platform.
Minimum API Level: 21 or higher.
Target SDK Version: 33 or higher.
Kotlin Version: 1.8.20 or higher.
Required Permissions:
android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE
.
and .
The asset key follows the format: OGY-XXXXXXXXXXXX
, where X represents an uppercase letter or digit. In the code samples provided, we will use the placeholder string OGY-XXXXXXXXXXXX
to refer to this asset key.
To import the latest version of the Ogury SDK into your project:
Open the build.gradle
of your application.
Add the following lines:
For details on the latest Ogury SDK release, please refer to the release notes.
When using a Consent Management Platform (CMP), it is recommended to wait for the CMP to establish the consent status before initializing the Ogury SDK.
When your app is registered and the Ogury SDK is imported, initialize it by calling Ogury.start()
before accessing any Ogury SDK functionalities.
The start()
method requires two key parameters :
the Application
context
the Ogury asset key associated with your app. If you have not an asset key yet, please refer to the first step to create one.
Though optional, the OguryOnStartListener
is recommended. It provides callbacks for successful initialization or errors. If initialization fails, the listener returns an OguryError
with an error code
and message
, helping you troubleshoot. The possible errors are defined in the OguryStartErrorCode
class for easy reference.
Ogury offers four distinct ad formats. You can refer to the following sections to proceed with the integration:
Enum value | Description |
---|---|
Ogury is part of the IAB Authorized Sellers for Apps initiative to fight inventory fraud for applications. It is recommended to to include Ogury.
MODULE_MISSING
The SDK could not be started because a required SDK module is missing.
MODULE_FAILED_TO_START
The SDK could not be started because one of the required SDK modules failed to start.