Android SDK overview
Welcome! We're here to make in-app purchases a breeze 🚀
We've built the Adapty Android SDK to take the headache out of in-app purchases so you can focus on what you do best – building amazing apps. Here's what we handle for you:
- Handle purchases, receipt validation, and subscription management out of the box
- Create and test paywalls without app updates
- Get detailed purchase analytics with zero setup - cohorts, LTV, churn, and funnel analysis included
- Keep the user subscription status always up to date across app sessions and devices
- Integrate your app with marketing attribution and analytics services using just one line of code
Before diving into the code, you'll need to integrate Adapty with Google Play Console and set up products in the dashboard. Check out our quickstart guide to get everything configured first.
Get started
Our docs are optimized for use with LLMs. Check out this article to learn how to get the best results when integrating the Adapty SDK using AI with our docs.
Here's what we'll cover in the integration guide:
- Install & configure SDK: Add the SDK as a dependency to your project and activate it in the code.
- Enable purchases through paywalls: Set up the purchase flow so users can buy products.
- Check the subscription status: Automatically check the user's subscription state and control their access to paid content.
- Identify users (optional): Associate users with their Adapty profiles to ensure their data is stored consistently across devices.
See it in action
Want to see how it all comes together? We've got you covered:
- Sample app: Check out our complete example that demonstrates the full setup
Main concepts
Before diving into the code, let's get familiar with the key concepts that make Adapty work.
The beauty of Adapty's approach is that only placements are hardcoded in your app. Everything else – products, paywall designs, pricing, and offers – can be managed flexibly from the Adapty dashboard without app updates:
-
Product - Anything available for purchase in your app – subscription, consumable product, or lifetime access.
-
Paywall - The only way to retrieve products from Adapty and use it to its full power. We've designed it this way to make it easier to track how different product combinations affect your monetization metrics. A paywall in Adapty serves as both a specific set of your products and the visual configuration that accompanies them.
-
Placement - A strategic point in your user journey where you want to show a paywall. Think of placements as the "where" and "when" of your monetization strategy. Common placements include:
main
- Your primary paywall locationonboarding
- Shown during the user onboarding flowsettings
- Accessible from your app's settings
Start with the basics like
main
oronboarding
for your first integration, then think about where else in your app users might be ready to purchase. -
Profile - When users purchase a product, their profile is assigned an access level which you use to define access to paid features.