Package 

Object InMobiSdk

  • All Implemented Interfaces:

    
    public class InMobiSdk
    
                        

    Constants and settings that have effect across the InMobi SDK.

    As part of the General Data Protection Regulation ("GDPR") publishers who collect data on their apps, are required to have a legal basis for collecting and processing the personal data of users in the European Economic Area ("EEA"). Please ensure that you obtain appropriate consent from the user before making ad requests to InMobi for Europe and indicate the same by following our recommended SDK implementation. Please do not pass any demographics information of a user; if you do not have user consent from such user in Europe.

    • Constructor Detail

    • Method Detail

      • init

        @UiThread() final static Unit init(Context context, @Size(min = 32, max = 36) String accountId, JSONObject consentObject, SdkInitializationListener sdkInitializationListener)

        Initialize the sdk. This must be called before any other API for the SDK is used.

        Parameters:
        context - Represents the application context
        accountId - Represents the accountId of the publisher
        consentObject - InMobi relies on the publishers to obtain explicit consent from users for continuing business activities in EU as per GDPR.
        sdkInitializationListener - Represents a listener object to provide callback when SDK initialization process is complete
      • setPartnerGDPRConsent

         final static Unit setPartnerGDPRConsent(JSONObject consentObject)

        This method should only be used by mediation partners to provide consent object. Publishers should not use this method.

        Parameters:
        consentObject - Partner provided consent object
      • setApplicationMuted

         final static Unit setApplicationMuted(Boolean muted)

        Inform SDK if any media which is rendered by SDK should be played muted. Passing true indicates that all media rendered by sdk after calling this method will be played with state mute.

      • getVersion

         final static String getVersion()

        Use this to get the version of the SDK.

      • setAge

         final static Unit setAge(Integer age)

        Set the user's age for targeting purposes.

      • setInterests

         final static Unit setInterests(String interests)

        Set the user's interest areas for targeting purposes.

      • getToken

         final static String getToken()

        Get a token for Advanced Bidding

      • setPublisherProvidedUnifiedId

         final static Unit setPublisherProvidedUnifiedId(JSONObject jsonObject)

        Set Unified ID procured from vendors directly. The ids are to be submitted in the following format. key would be the vendor and value would be the identifier. { "id5" : json(blob), "live Ramp": json(blob) }

        Parameters:
        jsonObject - Represents the unified id json blob.