Android

CastarSdk for Android

Overview

2024-11-04

CastarSdk SDK for Android helps you make money with Android apps. You only need to integrate once and reap the benefits easily.

It provides an integration package to support Android applications developed using Java/Kotlin. After 48 hours, you'll see revenue data in your dashboard. This document has a complete integrated solution and takes approximately 45 minutes to complete.

Integration options

Supports:

ARMv7 and ARMv8 architectures; Android system 4.3+

Step 1:Apply for ClientId

Go applications-> Add -> create your ClientId for Android

Step 2:Download the SDK

Click to download now. SDK for Android

Step 3:Import SDK Lib

(1).Add the castar.jar file to your project,put it into App module's libs directory.

(2).Implement sdk in your app module's build.gradle file.

dependencies {
        implementation(files("libs/castar.jar"))
}

(3).Add internet permission in your app module's AndroidManifest.xml file.

<uses-permission android:name="android.permission.INTERNET" />

(4).set usesCleartextTraffic="true" in your manifest's application node

<application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:usesCleartextTraffic="true"
>

(5).start the sdk in your Application or MainActivity

Example: Your CliendId is "CSK****FHQlUQZ"
Client.Start(context,"CSK****FHQlUQZ")

Optional APIs

If you want to verify if the SDK starts successfully, you can add the following listeners,when it returns ‘connected’ whitch means it start successfully

Kotlin

Client.setListener(object : StatusListener {
            override fun onClientStatusConnectChanged(p0: String?) {
               //need to deal it in your UI thread
            }
        })

Java

Client.setListener(new StatusListener() {
            @Override
            public void onClientStatusConnectChanged(String s) {
                //need to deal it in your UI thread
            }
        });

Stop service

Client.Stop()

Other questions

How to check the docking status after the docking is completed?

You can check the docking status of the SDK in the Dashboard - Applicatiopns menu. After the SDK is integrated and initialized successfully, you can check the activation status on the Dashboard. There is a 10-15 minute delay in the first activation status. Please wait patiently for the status update.

After the docking is completed, there is no data on the dashboard after the hang-up test?

Our Dashboard data refresh time is 0:00 every day to settle the previous day's earnings. After you generate data today, please query the test data the next day. We will settle your previous day's earnings the next day.

Contact us

If you have other questions, you can consult through the Livechat customer service window on the right side of the dial and official website, or you can contact our customer service staff through the following channels

Official email : [email protected]

WhatsAPP : https://whatsapp.com/channel/0029Vb0bHo50gcfFe6kQJR0a

Skype : https://join.skype.com/invite/ptBB6eukfkdX

Last updated