Are you ready to unlock the power of swift app development and take your Android game to the next level? In this quick start guide, we'll show you how to integrate the Xsolla Mobile SDK and start accepting payments in your Android game. With a pre-configured test project, you'll learn how to set up basic user authentication, import products (SKUs), and process a test payment.

Getting Started

Before we dive into the details, let's cover some essential information. As of October 29, 2026, U.S. Google Play apps may guide users to external payment methods via link-outs, use alternative billing solutions, and are no longer subject to anti-steering restrictions. This means you'll need to leverage direct APK distribution alongside in-app compliance with DMA to unlock access to over 1,000 global payment methods and bypass app-store fees.

Install the SDK

To get started, set minSdk to 24 (Android 7.0+). For more details, see [here](https://xsolla.com/mobile-sdk). Add the Maven Central repository to your project's Gradle script: repositories { mavenCentral() }. Then, add a new dependency for Xsolla Mobile SDK to your build.gradle: dependencies { def version_mobilesdk = ''; implementation "com.xsolla.android:mobile:$version_mobilesdk" }.

During the Developer Preview Phase, consult with your Account Manager for the latest version of Xsolla Mobile SDK for Android. For more detailed information, see [Installation](https://xsolla.com/mobile-sdk).

Configure the SDK

To configure the Xsolla Mobile SDK, prepare a Config that defines the SDK's behavior. In this example, we'll stick with the activity's onCreate method:

`java

public class YourSDKIntegrationActivity extends Activity {

// ...

private static final String TAG = "YourSDKIntegration";

// ...

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

// ...

final Config.Common configCommon = Config.Common.getDefault()

.withDebugEnabled(true)

.withLogLevel(LogLevel.VERBOSE)

.withSandboxEnabled(true);

// ...

}

}

`

For more details on the configuration procedure, see [Configuration](https://xsolla.com/mobile-sdk).

Initialize the SDK

Now that we have our configuration ready, it's time to initialize the SDK itself. Within the YourSDKIntegrationActivity class, declare a field:

`java

@Nullable

private BillingClient mBillingClient = null;

`

Add these lines right below where you prepared a Config to create a BillingClient: mBillingClient = BillingClient.newBuilder(this) .setConfig(config) .setListener(new PurchasesUpdatedListener() { // ... });

A newly created BillingClient instance needs to establish a connection to Xsolla services before it can be used. Call startConnection:

`java

mBillingClient.startConnection(new BillingClientStateListener() {

@Override

public void onBillingServiceDisconnected() {

Log.d(TAG, "Disconnected.");

}

@Override

public void onBillingSetupFinished(@NonNull final BillingResult billingResult) {

// Your post-connection code goes here..

}

});

`

Once the BillingClient becomes connected to Xsolla services, we can start safely fetching product details of the SKUs we're interested in. Put these lines inside the onBillingSetupFinished callback:

`java

final QueryProductDetailsParams queryProductDetailsParams =

QueryProductDetailsParams.newBuilder()

.setProductList(Arrays.asList(

QueryProductDetailsParams.Product.newBuilder()

.setProductId("key_1")

.setProductType(BillingClient.ProductType.INAPP)

.build()

))

.build();

mBillingClient.queryProductDetailsAsync(queryProductDetailsParams, new ProductDetailsResponseListener() {

@Override

public void onProductDetailsResponse(

@NonNull final BillingResult billingResult,

@Nullable final List productDetailsList

) {

// Your product details handling code goes here..

}

});

`

For more detailed information, see [Initialization](https://xsolla.com/mobile-sdk).

Make a Purchase

Once the SDK is fully initialized, we can make a purchase. Purchasing flow is initiated using BillingClient's launchBillingFlow method:

`java

if (billingResult.isSuccess() && productDetailsList != null && !productDetailsList.isEmpty()) {

final ProductDetails productDetails = productDetailsList.get(0);

final BillingFlowParams billingFlowParams =

BillingFlowParams.newBuilder()

.setProductDetailsParamsList(Arrays.asList(

BillingFlowParams.ProductDetailsParams.newBuilder()

.setProductDetails(productDetails)

.build()

))

.build();

// Initiate a purchasing flow.

mBillingClient.launchBillingFlow(this, billingFlowParams);

}

`

For more detailed information, see [Make a Purchase](https://xsolla.com/mobile-sdk).

By following these steps, you'll be able to integrate the Xsolla Mobile SDK and start accepting payments in your Android game. With swift app development, you can streamline your monetization and unlock new revenue opportunities.