Android

Overview

Integration and privacy details for the Stay22 Android 3.x SDK.

These guides describe the Android 3.x package family. Check minimum-version notes before using an example with an older release.

Your app supplies a destination and optional travel details. The SDK asks Stay22 whether to schedule a local accommodation notification. A tap opens the booking experience, with bookings attributed to your partner ID (aid).

An identical ensure keeps the current receipt. Use replace to change the trip and cancel to remove it. Scheduling does not wait for your app to leave the foreground. The operating system may show an alert later than the requested time.

Start with Quick Start, then read Notifications & Events and Testing. Release notes describe changes in individual releases.

The SDK starts enabled by default. To prevent startup contact until the user chooses, declare com.stay22.sdk.RequiresConsent in your application manifest and enable it with Stay22.setEnabled(application, true) after consent. The consent-required setup is available from SDK 1.4.0. A stored enabled value from before 1.4.0 does not count as an explicit choice. A choice made on 1.4.0 or later persists.

Disabling the SDK prevents new scheduling and cancels pending Stay22 notifications. Notification permission is a separate operating-system choice. See the setup instructions.

What reaches Stay22

Startup

While enabled, initialization requests your account settings and sends a load event. These requests use your partner ID and a Stay22-issued identifier (sid22) stored on the device and reused across launches. The load event includes operating-system and SDK versions and whether a small set of booking apps is installed. The SDK contributes the package-visibility declarations it needs through its manifest. These startup requests can happen before the user supplies a trip. A disabled SDK skips them.

Stay22 also receives the request IP address and derives approximate city, region, postal code, country, timezone and coordinates. The SDK requests no device-location permission and reads no device GPS location. The IP-derived city is not used as a trip destination.

Scheduling and delivery

The scheduling request sends the destination, destination coordinates, dates and hotel name your app supplied, together with your partner ID, session identifier, optional campaign and installed-app answers. This request also sends guest counts, language, notification-permission state, SDK version and nonblank extra context entries when supplied. Give the SDK only trip data your app is entitled to share.

The SDK reports observed notification delivery and failures such as denied permission. Stay22 keeps the destination and dates with the session's frequency-capping record. The current service expires that record after seven days by default; the duration is configurable per account.

A trip held by the device cooldown does not reach the scheduling service. SDK 3.x does not suppress a trip merely because its text matches the city estimated from the network address.

The client can prepare booking links from SDK 3.0.1. For this path, use SDK 3.1.1 or later and confirm that Stay22 has enabled it for your account. Without it, a tap opens the saved Stay22 link.

When enabled, the SDK sends the saved booking link to Stay22 while scheduling. That link carries the trip and identifiers described above. Stay22 stores a pending click record containing the trip, selected booking site, session identifier, device and language details, and approximate IP location. A record that never becomes a click expires automatically within about 37 days under the current service policy. Preparation alone does not count as a click.

A tap opens the prepared link while it is valid and reports the tap separately, without waiting for the report. The report carries the identifiers Stay22 issued for the prepared link. Consent still gates reporting. SDK 3.1.1 retries a failed tap report; withdrawing consent drops the report. A retry does not reopen the booking link. Once reported, the click follows Stay22's booking-link click retention policy.

App and request identity

Available from SDK 3.1.0: startup load, impression, failure, and notification-opt-out reports include the host app identifier, version and build, plus the SDK version sending the report. A missing app version or build is omitted. A shown report also includes the SDK version, request ID and revision saved when that notification was scheduled. Links built by the SDK carry that saved request identity; links returned by Stay22 are unchanged. The settings request and prepared-link tap report do not gain those app fields.

Cookies and store declarations

Stay22 responses set a session22 cookie containing the same sid22 value. The SDK installs no cookie handler. Android uses your app's process-wide cookie handler if one exists, including one installed by another dependency, so that handler may store the cookie. The SDK does not read it.

Complete your Google Play Data Safety declaration from the data flows described here. The SDK has no Android equivalent of Apple's privacy manifest.

These server-side retention and account settings describe the current service; staying on an older SDK release does not freeze server behavior. Contact support@stay22.com for the settings and retention policy applicable to your account.

On this page