Package com.iab.omid.library
Class Omid
java.lang.Object
com.iab.omid.library.Omid
This application level class will be called by all integration partners to ensure OM SDK has
been activated before calling any other API methods.
Any attempt to use other API methods prior to activation will result in an exception.
been activated before calling any other API methods.
Any attempt to use other API methods prior to activation will result in an exception.
Note that OM SDK may only be used on the main UI thread. Make sure you are on the main thread when you initialize the SDK, create its objects, and invoke its methods.
Created by Natasha Garner on 20/06/2017.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
activate
(Context applicationContext) Activate OM SDK prior to calling any other API methods.static String
Access the running OM SDK semantic version.static boolean
isActive()
Determine if the running OM SDK is active before attempting to create any ad sessions.static void
Notify OM SDK to update last activity time when users interact on CTV devices.
-
Method Details
-
activate
public static void activate(Context applicationContext) Activate OM SDK prior to calling any other API methods. On CTV, should be called on launch.- Parameters:
applicationContext
- of the running application.- Throws:
IllegalArgumentException
- if the supplied application context is null.
-
updateLastActivity
public static void updateLastActivity()Notify OM SDK to update last activity time when users interact on CTV devices.- Throws:
IllegalStateException
- if this method has been executed before OM SDK has been activated.
-
getVersion
Access the running OM SDK semantic version.- Returns:
- the current semantic version of the integrated OM SDK.
-
isActive
public static boolean isActive()Determine if the running OM SDK is active before attempting to create any ad sessions.- Returns:
- true if the OM SDK has already been activated.
-