Publisher SDK · Android · 1.3.2

Integrate the Android bandwidth-sharing SDK

Add com.github.bolivian-peru:android-peer-sdk:1.3.2 from JitPack, initialise it once with your SDK / device key, show your own consent screen, then call start(). Everything below is taken from the 1.3.2 source and README.

Registration does not guarantee traffic or earnings. Earnings depend on eligible traffic your devices actually serve and on your active partner terms.

Checked on against our published supplier terms

Before you start

Read where the SDK can ship: Google Play allows proxy services for third parties only in apps whose primary, user-facing purpose that is. You also need a farmer account with a signed agreement, a supply-source declaration describing your app and how users give permission, and an SDK / device key.

Integration steps

  1. Add JitPack and the dependency

    Gradle (Kotlin DSL)
    // settings.gradle.kts
    maven { url = uri("https://jitpack.io") }
    
    // app/build.gradle.kts
    implementation("com.github.bolivian-peru:android-peer-sdk:1.3.2")
  2. Initialise once

    init takes your context, your key and an optional Config. The key links every device to your farmer account.
    Kotlin
    import sx.proxies.peer.ProxiesPeerSDK
    
    class MyApplication : Application() {
        override fun onCreate() {
            super.onCreate()
            ProxiesPeerSDK.init(
                context = this,
                apiKey = "psx_your_sdk_key", // SDK / device key from farmer.proxies.sx
                config = ProxiesPeerSDK.Config(
                    userId = "optional-user-id",
                    onStatusChange = { status -> Log.d("Peer", "Status: $status") },
                    onEarningsUpdate = { e -> Log.d("Peer", "Cents: ${e.totalEarnedCents}") }
                )
            )
        }
    }
  3. Show your own disclosure, then start

    The SDK has no consent UI. Explain in your app that the device's connection will carry traffic for other companies, ask for agreement, and call start() only after the user agrees. Call stop() when they withdraw.
    Kotlin
    val sdk = ProxiesPeerSDK.getInstance()
    
    // Only after the user has agreed in your in-app disclosure
    sdk.start()          // starts the foreground service
    sdk.stop()           // stops sharing when the user withdraws consent
    sdk.isRunning()      // Boolean
    sdk.getStatus()      // STOPPED, CONNECTING, CONNECTED or ERROR
  4. Read status and earnings

    getEarnings() and getDetailedEarnings() are suspend functions; refreshEarningsNow() triggers a refresh.
    Kotlin
    lifecycleScope.launch {
        val e = sdk.getEarnings()        // suspend
        Log.d("Peer", "MB shared: ${e.totalTrafficMB}")
    }
  5. Self-test one device

    Once the device shows online, run the self-test with your account key (not the device token). It checks the tunnel path end to end.
    Shell
    curl -X POST https://api.proxies.sx/v1/peer/my-devices/DEVICE_ID/test \
      -H "X-API-Key: psx_your_sdk_key"

Public API in 1.3.2

From ProxiesPeerSDK.kt.
SDK methods
MethodWhat it does
init(context, apiKey, config)Creates the single instance; call once
getInstance()Returns the instance; throws if init was not called
start() / stop()Starts or stops the foreground sharing service
isRunning() / getStatus()Service state; Status is STOPPED, CONNECTING, CONNECTED or ERROR
getEarnings() / getDetailedEarnings()Suspend functions returning earnings and traffic for this device
refreshEarningsNow()Refreshes earnings and fires onEarningsUpdate
updateWallets(usdt, btc, sol)Suspend; sets payout wallets for the device
requestPayout(currency)Suspend; requests a withdrawal to the registered wallet

Config accepts apiUrl, relayUrl (a pin, which disables relay redirects), userId, onEarningsUpdate and onStatusChange. There are no bandwidth-cap, charging-only or mobile-only options.

Permissions and disclosure

Merged into your app from the SDK manifest. Declare them accurately in your store listing and privacy policy.
Declared permissions
PermissionNote in the SDK source
INTERNETRequired
ACCESS_NETWORK_STATERequired
ACCESS_WIFI_STATERequired
FOREGROUND_SERVICERequired; the sharing service is a foreground service
FOREGROUND_SERVICE_DATA_SYNCRequired; the service type is dataSync
WAKE_LOCKRequired
READ_PHONE_STATE"Optional: For carrier information (improves routing)"

On Android 13 and later, request POST_NOTIFICATIONS at run time so the service notification can show. Credentials are stored with AES-256-GCM through the Android Keystore.

Versions

Git tags in the public repository.
Release history
VersionTagged
1.3.22 Sep 2026
1.3.122 May 2026
1.3.021 May 2026
1.2.119 May 2026
1.2.019 May 2026
1.1.419 May 2026
1.1.318 May 2026

Per the README, 1.3.2 makes the status reach CONNECTED when the relay socket opens, sends the device token on earnings, wallet and payout calls, and refreshes tokens with POST instead of re-registering on every launch.

Questions

Which Gradle coordinate do I use?
com.github.bolivian-peru:android-peer-sdk:1.3.2 from JitPack. The README also shows the tag with a leading v (v1.3.2); JitPack builds both.
Which permissions does the SDK add to my app?
Seven, through manifest merge: INTERNET, ACCESS_NETWORK_STATE, ACCESS_WIFI_STATE, FOREGROUND_SERVICE, FOREGROUND_SERVICE_DATA_SYNC, WAKE_LOCK and READ_PHONE_STATE. On Android 13 and later your app also has to request POST_NOTIFICATIONS at run time for the foreground-service notification.
Why is READ_PHONE_STATE declared?
The SDK manifest labels it "Optional: For carrier information (improves routing)". It is declared in the SDK manifest, so it appears in your merged manifest and must be accounted for in your store listing and privacy disclosures.
Can I rotate the device IP from the SDK?
No. On-demand IP rotation is not in 1.3.2; the README says the backend rotate route has returned HTTP 501 for SDK clients since v1.1.x.
Can I cap how much data a user shares?
Not in 1.3.2. The Config accepts apiUrl, relayUrl, userId, onEarningsUpdate and onStatusChange only.
How do I know a device is really working?
Watch for CONNECTED in onStatusChange, then run the self-test endpoint with your account key once the device shows online. Auto-approval needs at least an hour online and a quality score of 50 or more.

Get an SDK key

Create an SDK / device key in the farmer dashboard and test one build on one device before release.

Sources