Apps Kit SDK

Responsive Hamburger Icon

Introduction

Welcome to The Apps Kit SDK documentation! The Apps Kit SDK is a comprehensive toolkit designed to empower developers it provides the easy management tools and resources you need to enhance your app's functionality, user experience, and monetization potential.

Getting Started

This documentation will help you integrate The Apps Kit SDK to effortlessly control your ad management strategies and increase your ad match and show rates helping maximize your revenue potential.

Adding App

Get started by signing up on The Apps Kit SDK portal. Create your account using your email or sign up instantly with your Google account.

Functionality Guideline

After signing up, you'll land on the main page displaying details of your apps. The page starts empty, prompting you to add your app by clicking the create button.

Functionality Guideline

Next, easily add your app by entering its name, package name, and other basic information.

Functionality Guideline

After adding the app, proceed to set up additional information. We'll guide you through each step. Choose the Dev or Live environment from the toggle displayed at the top right corner.

Functionality Guideline

Choose a mediation network for various ad formats from the dropdown menu. Once selected, proceed to the next step.

Functionality Guideline

After selecting the mediation network, proceed to add ad units for the chosen ad formats. Only ad formats corresponding to the selected ad mediation network will be displayed.

  • Pre-loading: By enabling pre-loading, you can pre-load ad unit at the start of the session.
Functionality Guideline

Next, add placeholders where ads should appear, which can be easily modified or replaced as needed.

Functionality Guideline

Next, map ad units to specific placements to ensure ads are shown in the designated areas of the app.

Functionality Guideline

For Interstitial ads, choose from different display options such as Click-based, Click and time-based, Time-based, or Scene-Based. For each option, select additional parameters that best suit the app for optimal performance.

  • Scene based: Interstitial ads displayed at specific placeholders that are selected.
  • Click based: The number of clicks between two consecutive interstitials to show an ad.
  • Time based: The time in seconds between two consecutive interstitials to show an ad.
  • Click and time based: The time in number of clicks between two interstitials to show an ad.
  • Click to show ad: The number of clicks after which an ad will be displayed. For example, setting this to 3 means an ad will appear after every 3 clicks.
  • Ad display interval: It determines how frequently ads are shown. For example, setting it to 30 seconds will display an ad every 30 seconds.
  • Initial clicks exclusion: The number of initial clicks to be excluded before ads start displaying. For example, setting this to 5 means the first five clicks from the users will not be counted.
Functionality Guideline

Activate the Mobile Measurement Partner (MMP) of choice from the available options.

Functionality Guideline

In the settings,provide additional information according to the preferences to maximize the app's potential.

  • Enable console logs: Enable console logs in the development environment.
  • Enable ad event: Enable the AKS (Apps Kit SDK) custom e_AD event to trigger it in analytics events.
  • Enable post-loading: By enabling post-loading, the next full-screen ad will automatically load as soon as the previous ad is closed.
Functionality Guideline

Once all the parameters are added, press configuration and follow the following steps.

Functionality Guideline

Once you've configured your app settings and preferences in the portal, refer to our integration guides and documentation for step-by-step instructions on integrating The Apps Kit SDK into your app.

Profile and Payments

In the Profile Section, input basic details and upload a profile photo.

Functionality Guideline

In the Billing History section, past payments can be easily viewed and reviewed. The details include:

  • App Name: The name of the app associated with the payment.
  • Billing Period: The duration for which the billing applies.
  • Transaction ID: A unique identifier for each transaction.
  • Date: The date when the payment was processed.
  • Payment Method: The method used for the payment, such as type of credit or debit card.
  • Payment Status: The current status of the payment, such as paid or failed.

This organized layout allows for quick access and tracking of all payment-related information.

Functionality Guideline

Integration Guide

After configuring your app settings and preferences in the portal, refer to our integration guides and documentation for step-by-step instructions on integrating The Apps Kit SDK into your app.

Adding Dependencies:

Once you've configured your app settings and preferences in the portal, refer to our integration guides and documentation for step-by-step instructions on integrating The Apps Kit SDK into your app.

SDK Initialization

You can download the AppsKitSDK_v:x.x.xx.aar from the Apps Kit SDK portal. Create a libs folder in your app directory and add the SDK AAR file to this folder. Next, add the following dependencies to your app-level build.gradle file.

Add the following dependencies in your app level build.gradle file

Add the following Gradle repository declaration in your settings.gradle file

Manifest

Add the following code in your manifest:

ProGuard Rules

If you have enabled minify in your app-level build.gradle file, add the following ProGuard rules to your app-level proguard-rules.pro file.

Initialize SDK

The Apps Kit SDK needs to be initialized, using the following code:

Extend your Application class with AppsKitSDKApplication as

  • fetchFirebaseDefaults(): Returns the ID of your remote_config_defaults file.
  • isTestMode(): Returns true if you are in Test Mode.
    Note: In Test Mode, you will see test ads.
  • isDevMode(): Returns true if you are in Development Mode.
    Note: In Development Mode, dev configurations will be used.
  • onConfigsReadyToUse (remoteConfig): Provides an object of remoteConfig. If you are using remote configs in your app other than AKS_CONFIGS_DEV and AKS_CONFIGS_LIVE, you can fetch your remote configs from this remoteConfig object.
  • setAKSDefaultConfigs(): Returns your default configurations.
    Note: Ensure to return the value for "configs" from the config JSON generated from the AKS portal.

Extend your all activities from AppsKitSDKBaseActivity as

User Consents Management

In the first activity of your app (Splash Activity), request user consent using the Google UMP SDK. Update the user consent status in the AppsKit SDK based on the received consent. Use the following code to update the user consent status in the AppsKit SDK:

  • isUserConsents: If user has provided the consents pass true

If you set this to false, the Apps Kit SDK will not serve ads. Once you have updated the user consent status in the Apps Kit SDK, you can start requesting ads.

Note: User consent is initially set to false by default, and the Apps Kit SDK will not serve ads until consent is explicitly updated.

Initialize Ads

Note: It is mandatory to initialize your in you application onCreate method.

  • YOUR_IRON_SOURCE_APP_KEY: Pass the ironSource App key for your app.
  • YOUR_MAX_SDK_KEY: Pass the AppLovin MAX SDK key for your app.
  • YOUR_HELIUM_APP_ID: Pass the Helium app ID for your app.
  • YOUR_HELIUM_SIGNATURE: Pass the Helium signature for your app.
  • isChildDirected: Pass true if your app is directed towards children.
  • isSubjectToGDPR: Pass true if your app is subject to GDPR regulations.
  • userHasGivenConsent: Pass true if user consents have been provided.
  • isCCPAConsent: Pass true if CCPA consents have been provided.

Interstitial Ad

Load Interstitial Ad

To show interstitial ads, you need to load them beforehand. Use the following method to load an interstitial ad:

  • placeholder: The placeholder you added in the portal for that screen. If an empty or invalid placeholder is passed, the ad will not be loaded.
  • activity: Reference to the Activity.
  • callback: Callback to update whether the ad is loaded or failed to load.

Show Interstitial Ad

Next, add the following lines of code to display an interstitial ad in your app:

  • placeholder: The placeholder you added in the portal for that screen. If an empty or invalid placeholder is passed, the ad will not be loaded.
  • activity: Reference to the Activity.

Load and Show Interstitial Ad

If you have selected any interstitial ad display options from the Apps Kit SDK portal, call the following method to request an interstitial ad.

  • placeholder: The placeholder you added in the portal for that screen. If an empty or invalid placeholder is passed, the ad will not be displayed.
  • activity: Reference to the Activity.
  • showProgressDialog: Pass true if you want to show a loading dialog while the ad is loading.

Rewarded Callbacks

AdsCallback

You have two types of callbacks in rewarded ads depending on what method you are using to call ads:

RewardedAdCallbacks

RewardedLoadAndShowCallback

Rewarded Ad

Load Rewarded Ad

To show rewarded ads, you need to load them beforehand. Use the following method to load a rewarded ad:

  • placeholder: The placeholder you added in the portal for that screen. If an empty or invalid placeholder is passed, the ad will not be loaded.
  • activity: Reference to the Activity.
  • callback: Callback to update whether the ad is loaded or failed to load.

Show Rewarded Ad

Next, add the following lines of code to display a rewarded ad in your app:

  • placeholder: The placeholder you added in the portal for that screen. If an empty or invalid placeholder is passed, the ad will not be loaded.
  • activity: Reference to the Activity.
  • callback: Callback to update whether the ad is loaded or failed to load.

Load And Show Rewarded Ad

  • placeholder: The placeholder you added in the portal for that screen. If an empty or invalid placeholder is passed, the ad will not be loaded.
  • activity: Reference to the Activity.
  • callback: Callback to update whether the rewarded ad is completed or failed to show.

AppOpen Ad

AppsKitSDK automatically handles the App Open Ad at the application level when you extend your Application class from AppsKitSDKApplication

In your first Activity, such as the Splash Activity, call this code in your onCreate method:

  • callback: Callback for the state of the App Open Ad.

Banner Ad

Show Banner Ad

To display a banner ad, add the following lines of code:

  • placeholder: The placeholder which you added on the portal for that screen if you pass an empty or invalid placeholder, ad will not be displayed.
  • activity: Reference of the Activity
  • layout: layout in which you want to show banner ad
  • skeleton: The loading view you what to show while banner is loading
  • isCollapsiable: if you want to use collapsible banner pass true
  • adSize: Ad size you want to show like MEDIUM_RECTANGLE, BANNER, LEADERBOARD etc

If you use SkeletonScreen, you need to add the following dependency in your Gradle file:

Native Ad

Show Native Ad

To display a native ad, add the following lines of code:

  • placeholder: The placeholder you added in the portal for that screen. If an empty or invalid placeholder is passed, the ad will not be displayed.
  • activity: Reference of the Activity
  • frameLayout: The layout in which you want to display the native ad.
  • skeleton: The loading view you want to show while the native ad is loading.
  • res: The ID of your custom native ad view if you want to display a customized native ad.

Note: If you are using custom layouts for Native Ads, ensure that the IDs of your views match the following:

  • App Icon:ad_app_icon
  • Title:ad_headline
  • Advertiser:ad_advertiser
  • Rating Bar:ad_stars
  • Ad Body:ad_body
  • Media View:ad_media
  • Pricing:ad_price
  • Store Name:ad_store
  • Action Button:ad_call_to_action

Manage Remove Ads from SDK

The Apps Kit SDK manages ad availability based on the "Remove Ads" status. If you want to stop ads after a "Remove Ads" purchase, use the following code:

Note: Once you set the "Remove Ads" status, the SDK will manage ad availability based on the last provided status, unless the app is uninstalled and reinstalled.

Feature Promotion:

When a feature promotion is clicked, a callback is received in AppsKitSDKBaseActivity as follows. You need to navigate the user to the respective screen based on the targetScreen.

  • targetScreen: The target screen associated with the feature promotion that was clicked.

If you want to stop or disable specific feature promotions based on certain actions or scenarios, you can disable those feature promotions as follows:

disableFeaturePromotions: The list of targetScreens for which you want to disable feature promotions.

  • Example: If you are promoting subscriptions using Feature Promotions through AKS and want to disable the subscription feature promotion after users subscribe, you would pass a list of strings containing the targetScreen for your subscription screen.

Advance AppsKit Control:

Internet Connectivity

To manage internet connectivity, you can override the following methods in your activity, inherited from AppsKitSDKBaseActivity:

  • getSnackBarView(): Return your view to display the Snackbar, such as a CoordinatorLayout.
  • onInternetConnectivityChange (Boolean isInternetAvailable): Update based on whether internet is available or not.

You can also disable internet connectivity using the method below: (By default, internet connectivity is enabled.)

Sending Events on Firebase

AppsKitSDK makes it easy to send events to Firebase. You can send an event to Firebase using the following code:

  • context: Reference to the context.
  • event: The event you want to fire. (Note: Maximum event length is 60 characters.)

To create easy-to-understand and meaningful events, AppsKitSDK provides the following method in AppsKitSDKBaseActivity

  • eventType: Specify the event type, which could be SCREEN, BTN, TAB, etc.
  • eventName: Name of your event. This can be your screen, tab, button, or any other specific view name.

Ensure you set the screenNameAndId before using the sendAKSEvent(AppsKitSDKEventType eventType,String name) method to send events in your Activity.

You need to override this method and send screenName and screenId as a Pair.

Note: If you don’t set the setScreenNameAndId, AKS will not fire events on Firebase.

Local Notifications

To keep users engaged, Apps Kit SDK allows you to create notifications from your app. Create a broadcast receiver by extending AppsKitSDKLocalNotificationBroadcastReceiver as shown below:

  • notificationModelId: Unique Id for notification Model
  • title: Title of notification
  • description: Description of notification
  • icon: Icon of Notification
  • notificationId: Unique Id for notification
  • targetScreen: Add your Fully Qualified Class Name as target screen i.e; com.example.MainActivity

Then call your scheduleLocalNotifications from you Application class to trigger broadcast receiver when need to fire notification

Auto Update App

Apps Kit SDK facilitates enabling auto updates for your app if a new version has been released on the Google Play Store. You need to override the following method:

In your activity, extend from AppsKitSDKBaseActivity, and return true on the screen where you want to display the update screen.

Testing and Debugging

If console logs are enabled from the AppsKitSDK portal, you’ll receive console logs under the key PTB_LOG. You can use these logs to debug any issues.