The IdlePay SDK
The IdlePay SDK lets your app earn from its users without ads. With a user's permission, the SDK shares their device's own internet connection with IdlePay, and your account earns for every full hour that device is online.
| Pay | Per full hour each device is online: $72 a month for every 1,000 devices online all month. See Hours, pay and eligibility. |
| Platforms | Android phones and tablets, Android TV and Fire TV, Windows (x64), macOS (Apple silicon and Intel), Linux (x86-64, ARM64, ARMv7) |
| Languages | Kotlin and Java, C# (.NET), JavaScript (Electron and Node.js), Python, C and C++, and any language that can call a C library |
| Access | Approved developers only. Getting approved is step 1 below. |
| Downloads | Available on your SDK page once your account is approved. |
How it works
- Your app asks the user whether they want to share their connection. Only if they say yes does it start the SDK.
- The SDK runs inside your app, in the background. It connects to IdlePay and, when one of our business customers needs to reach a public website, sends that request out through the device's connection.
- The traffic can't reach the user's device or local network, and email ports are blocked. The same rules apply as for every connection on IdlePay (Bandwidth Sharing Agreement).
- Each install of your app is one device on your SDK page. Every full hour it's online earns, whatever traffic it carries.
- The SDK reconnects, re-links and recovers by itself. Your app only starts it, stops it and, if you like, pauses it.
1. Get approved
Every developer is reviewed before their app's devices can earn. Create a free account if you don't have one, then open a support ticket with:
- your app's name and what it does;
- the platforms you'll add the SDK to;
- a link to the app in its store, or to its website;
- how the app will ask users before sharing (a screenshot or a description of the screen is enough). See Asking for consent.
Once your account is approved, the SDK page of your dashboard lets you download the SDK and create keys. Until then, the SDK can't link devices, so you can't test it yet: its status shows "this app's IdlePay account isn't approved for the SDK program".
2. Create an SDK key
On the SDK page, enter your app's name and click Create key. Copy the key: it starts with ipsk_ and is shown only once.
- Create one key per app. The SDK page shows hours and earnings for each one.
- The key goes inside your app's code. It isn't a secret like a password: someone who extracts it can only add devices that earn for you.
- Revoking a key stops every device of that app within a minute. To start again, put a new key in an update of the app.
3. Plan the consent screen
Before the SDK starts, your app must explain the sharing in plain words and get a clear yes, and users must be able to turn it off again easily. On Android and in Electron, the SDK has a ready-made consent screen you can use instead of building one. Asking for consent has the rules, sample wording you can adapt, and what to record.
4. Add the SDK to your app
Pick the guide for your app. Each one walks through the download, adding it to the project, the consent prompt, starting and stopping, testing and shipping.
Not supported yet: iOS and iPadOS, and TV apps written only in JavaScript (webOS and Tizen web apps).
5. Test it on a real device
Test on a real phone, TV box or computer on a home internet connection. Connections from offices, VPNs, cloud servers and mobile data aren't used, and running the SDK on emulators or virtual machines is against the Terms.
- Start your app and agree to share.
- Within about a minute, the SDK's status goes from connecting through checking to online. Each guide shows how to read the status.
- The device appears under Devices on your SDK page.
- After 60 minutes online, the first device-hour shows up in Device-hours today.
Testing two devices on the same Wi-Fi? Only one device per IP address is used, so the second one shows duplicate. That's expected: it takes over if the first one leaves. If the status shows something else, look up its message in Options, status and errors.
6. Release your app
- Mention the sharing in your store listing and privacy policy where the store requires it. See App stores.
- Keep each user's consent record. See Consent records.
- Tell us in a support ticket before you change the consent screen or how you find users.
- Check your SDK page for devices, hours and earnings. Earnings become available when each UTC day closes and are withdrawn like all IdlePay earnings (Payouts).
Questions
Does it use my users' data plan or battery? On Android the SDK only shares on Wi-Fi and Ethernet. Traffic only flows when a customer uses the device, and you can set a daily limit per device. When nobody uses the device, the SDK just keeps one connection open.
Do I also earn per GB? No. SDK devices are paid per hour, whatever traffic they carry. Connections you share with the IdlePay app itself are paid per GB as usual.
Do referral bonuses apply? Yes. If someone referred you, they earn their bonus on your SDK earnings, paid by us.
How do I update the SDK? Download the new version from the Downloads tab on your SDK page and replace the files in your app. Devices keep their link to your account across updates.