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 CastarSdk.aar 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/CastarSdk.aar"))
    }

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

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

(4).Create your Application, init sdk and start it.

Example: Your CliendId is "CSK****FHQlUQZ"
    import android.app.Application
    import com.castarsdk.android.CastarSdk
        
    class MyApplication:Application() {

            override fun onCreate() {
                super.onCreate()
                
                //set your ClientId and start sdk.
                GlobalScope.launch(Dispatchers.IO) {
                    CastarSdk.Start(this@MyApplication, "CSK****FHQlUQZ")
                }
                
            }
                
    }

(5).Declare your application in your AndroidManifest.xml file.

   
    <application
        android:icon="@mipmap/ic_launcher"
        android:label="demo"
        android:name=".MyApplication"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Test2"
        tools:targetApi="31">

    </application>
            

Optional APIs

Start service ( Attention: It needs to be started in a sub thread )

Kotlin

GlobalScope.launch(Dispatchers.IO) {
    CastarSdk.Start(context, "your clientid")
}

Java

new Thread(new Runnable() {
    @Override
    public void run() {
        CastarSdk.Start(context, "your clientid");
    }
}).start();

Stop service

CastarSdk.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 : support@castarsdk.com

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

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

Last updated