---
title: "Control Google Play messages in Android SDK"
description: "Choose when your Android app shows Google Play in-app messages, such as payment decline notices, so they don't interrupt a flow or onboarding."
---

> **AI agents**: to search Adapty docs faster and with fewer tokens, install the Adapty skills: `npx adapty skills install --yes`

Google Play sometimes needs to show your users a message about their subscription — for example, that a subscription payment was declined and the payment method needs an update. Google Play shows these messages on top of your app, only when the app requests them.

By default, the Adapty SDK requests Google Play messages every time an `Activity` of your app starts. The message then appears over whatever that `Activity` displays, including a flow, an onboarding, or a checkout. To choose the moment yourself, switch the SDK to manual message handling, and call `showStoreMessages` when a message won't interrupt the user.

Google Play decides whether a message applies to the user, so a request doesn't always show a message. If the user fixes their payment method from the message, the SDK syncs the user's purchases with Adapty, and your [profile listener](android-listen-subscription-changes) receives the updated access level.

:::warning
In manual mode, the SDK never requests Google Play messages on its own. If your app never calls `showStoreMessages`, users with a declined payment don't see the notice in your app.
:::

## Before you start

You need Adapty Android SDK 4.3.0 or later. Earlier versions don't request Google Play messages.

## Enable manual handling

To request Google Play messages only when your app calls `showStoreMessages`, set `withStoreMessagesHandling` to `MANUAL` when you [activate the SDK](sdk-installation-android#activate-adapty-module-of-adapty-sdk):

<Tabs groupId="current-os" queryString>
<TabItem value="kotlin" label="Kotlin" default>

```kotlin showLineNumbers

AdaptyConfig.Builder("PUBLIC_SDK_KEY")
    .withStoreMessagesHandling(AdaptyConfig.StoreMessagesHandling.MANUAL) // AUTO is the default
    .build()
```

</TabItem>
<TabItem value="java" label="Java" default>

```java showLineNumbers

new AdaptyConfig.Builder("PUBLIC_SDK_KEY")
    .withStoreMessagesHandling(AdaptyConfig.StoreMessagesHandling.MANUAL) // AUTO is the default
    .build();
```

</TabItem>
</Tabs>

## Show messages

When your app reaches a point where a Google Play message won't interrupt the user — for example, after the user closes a flow or finishes onboarding — call `showStoreMessages` with the `Activity` that displays the message:

<Tabs groupId="current-os" queryString>
<TabItem value="kotlin" label="Kotlin" default>

```kotlin showLineNumbers
Adapty.showStoreMessages(activity)
```

</TabItem>
<TabItem value="java" label="Java" default>

```java showLineNumbers
Adapty.showStoreMessages(activity);
```

</TabItem>
</Tabs>

The method returns no result. The SDK doesn't request a message in these cases:

- **The SDK isn't activated**: Call `showStoreMessages` after `Adapty.activate`.
- **The `Activity` can't display a message**: The `Activity` is finishing or destroyed, or its window isn't attached yet. Call the method from an `Activity` that the user sees.

In the default `AUTO` mode, you can also call `showStoreMessages` — for example, to request a message again on an `Activity` that is already running.