MediumHow to Integrate PacketSDK in Your React Native Android App | by Abhay kanwasi | Medium
Sitemap
Abhay kanwasi

Abhay kanwasi

Software engineer diving into AI, freelancing & career growth. Writing about real tech challenges, software dev, and innovation with Django, React & cloud

How to Integrate PacketSDK in Your React Native Android App

4 min readOct 7, 2025

--

If you are building a React Native app and want to monetize it effectively using PacketSDK, this guide is for you. Even if it’s your first time working with native Android SDKs in a React Native project, don’t worry — this walkthrough is beginner-friendly and includes all the steps you need.

PacketSDK helps you monetize your app by leveraging unused device resources, and integration is straightforward if you follow the steps carefully.

Step1: Sign Up and Create Your App on PacketSDK

Press enter or click to view image in full size
PacketSDK Dashboard

In the dashboard you will be seeing something like this:
Click on Create your first app

You will go to this page:

Create App Page

Fill the App Name: Example (It can be anything you want)

Choose the operating system in your case it is Android

Application ID: enter your app’s applicationId (found in android/app/build.gradle). Like my project name was client then my application id was com.client

All other fields are optional you can fill them or move ahead like me. After filling it will look like this:

App Form Filled

Then click on Create App.

You will be redirected to this page:

Now our app is ready and we are going to integrate the SDK. First download the SDK it will download with file name like this: packet_sdk_android-1.2.3.zip file. Extract the file you will get a demo where it is implemented PacketSDKDemo Also copy the appkey we will be using it later.

What we need is the libs folder there which contains packet_sdk_v1.2.3.aar

Step 2: Add the SDK to Your Project

  • Copy the .aar file into your project’s android/app/libs/ folder.
  • Open android/app/build.gradle and add:
dependencies {
<some-other-dependencies>

implementation files(‘libs/packet_sdk_vX.Y.Z.aar’) // Replace with your version
}

Example folder structure:

my-application
├── app
│ ├── libs
│ │ ├── packet_sdk_v***.aar
│ ├── src
│ │ ├── main
│ │ └── AndroidManifest.xml
│ └── build.gradle.kts
├── gradle.properties
├── gradlew
…

Get Abhay kanwasi’s stories in your inbox

Join Medium for free to get updates from this writer.

Reference: PacketSDK Android Editor Guide

Step 3: Update Your Android Manifest

Open android/app/src/main/AndroidManifest.xml and inside the <application> tag, add:

<application
android:supportsRtl="true"
android:usesCleartextTraffic="true" />

Also, make sure you have Internet permissions:

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

This ensures the SDK can communicate with Packet servers.

Step 4: Initialize PacketSDK

In MainApplication.kt:

import android.app.Application
import com.packet.sdk.PacketSdk

class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
PacketSdk.initialize(this, "your_app_id") # app_key we copied earlier
PacketSdk.setEnableLogging(true)
}
}

In MainActivity.kt:

import android.os.Bundle
import com.facebook.react.ReactActivity
import com.packet.sdk.PacketSdk

class MainActivity : ReactActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
PacketSdk.start()
// Optional: Monitor SDK status
PacketSdk.setStatusListener { code, msg ->
android.util.Log.d("PacketSDK", "Status: $code, Message: $msg")
}
}
override fun onDestroy() {
super.onDestroy()
PacketSdk.stop()
}
}

Reference: PacketSDK Android Editor Guide

Step 5: Build and Run Your App

  • Connect your Android device via USB or ADB over Wi-Fi.

Run:

npx react-native run-android

Monitor the logs using:

adb logcat | findstr PacketSdk

Look for Connect success. — this confirms the SDK is properly connected.

Press enter or click to view image in full size

Step 6: Verify Integration

Once your app is running, check your PacketSDK dashboard. You should start seeing metrics within 24 hours. If it still says “Integration Pending,” verify:

  • The .aar file is in libs/.
  • The Application ID matches the one in your manifest.
  • The device has Internet access and the app has permission.

You will not see effects immediately also before your app go live and got actual user you packetsdk account is not monetized.

For seeing difference in packet sdk dashboard of your app. Connect actual devices like this:

There are 2 ways of doing it:

  1. Using USB
  • In case of USB you first have to enable developer mode.
  • Search for USB Debugging and enable it. For verify connnection run this command in your desktop adb devices.
  • You should see your device listed with status device.
    See for your mobile device id. Then do this:
npx react-native run-android — deviceId <device id>

It will use your phone as emulator and install app on your phone and you will be seeing your app in your phone.

  • If it says unauthorized, check your device screen and accept the debugging prompt.

2. Using Wifi

  • Make sure your phone and laptop are on the same Wi-Fi network.
  • On your Android phone:
    - Go to Developer Options → Wireless Debugging.
    - Tap Pair Device with Pairing Code.
    - It will give you 2 things:
    - Password
    - IP:Port
  • On your laptop instead of ip and port fill what you are seeing in your phone.
adb pair <ip>:<port>

It will ask for password enter the password which shows in your phone.

After this get successful connect with device using this:

adb connect <your phone ip> # You will find it in Pair Device Menu
  • Verify Connection
adb devices # You will find your device name listed here with the ip

Now you can build and run your app normally using:

npx react-native run-android --device <ip>:<port>

--

--

Abhay kanwasi
Abhay kanwasi