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
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")Initialise once
inittakes your context, your key and an optionalConfig. 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}") } ) ) } }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 callstart()only after the user agrees. Callstop()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 ERRORRead status and earnings
getEarnings()andgetDetailedEarnings()are suspend functions;refreshEarningsNow()triggers a refresh.Kotlin lifecycleScope.launch { val e = sdk.getEarnings() // suspend Log.d("Peer", "MB shared: ${e.totalTrafficMB}") }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
| Method | What 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
| Permission | Note in the SDK source |
|---|---|
| INTERNET | Required |
| ACCESS_NETWORK_STATE | Required |
| ACCESS_WIFI_STATE | Required |
| FOREGROUND_SERVICE | Required; the sharing service is a foreground service |
| FOREGROUND_SERVICE_DATA_SYNC | Required; the service type is dataSync |
| WAKE_LOCK | Required |
| 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
| Version | Tagged |
|---|---|
| 1.3.2 | 2 Sep 2026 |
| 1.3.1 | 22 May 2026 |
| 1.3.0 | 21 May 2026 |
| 1.2.1 | 19 May 2026 |
| 1.2.0 | 19 May 2026 |
| 1.1.4 | 19 May 2026 |
| 1.1.3 | 18 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
Sources
Read from the 1.3.2 tag on 27 September 2026.
- [1]https://github.com/bolivian-peru/android-peer-sdk
- [2]https://github.com/bolivian-peru/android-peer-sdk/blob/1.3.2/sdk/src/main/AndroidManifest.xml
- [3]https://jitpack.io/#bolivian-peru/android-peer-sdk
- [4]https://agents.proxies.sx/peer/skill.md
- [5]https://support.google.com/googleplay/android-developer/answer/16559646