Testing & Troubleshooting

Verify your Stay22 Mobile SDK integration in minutes and diagnose why a notification didn't show.

Test mode

In production the notification arrives on Stay22's schedule, after the user leaves your app — too slow for a development loop. The SDK ships QA flags that compress the whole flow into seconds:

Stay22.testing.force = true
Stay22.testing.showLogs = true

Stay22.setTravelContext(TravelContext(address = "Paris, France"))
Stay22.testing.force = true
Stay22.testing.showLogs = true

Stay22.setTravelContext(TravelContext(address: "Paris, France"))
  • testing.force — schedules with a fixed 5-second delay and relaxes the relevance checks, so you always get a notification.
  • testing.showLogs — prints the SDK's decisions to the console.

To run a full test: enable both flags, set a travel context, background the app, and the notification appears about 5 seconds later. Tap it to verify the booking experience opens with your attribution.

Never ship a build with testing.force or testing.showLogs enabled — force mode bypasses the timing and relevance rules that protect your users from notification spam.

Why didn't the notification show?

The SDK reports every held-back notification as a notificationSkipped, notificationBlocked, or notificationCancelled event with a reason — set an event handler and check it first. The usual suspects:

SymptomCheck
Nothing happens at allIs Stay22.isEnabled set to true? Did Stay22.initialize run at app launch with your aid?
notification_permission_deniedThe user declined the OS prompt — call Stay22.requestNotificationPermission() at a better moment, or guide them to system settings.
app_foregroundNotifications only deliver after the user leaves the app. Background the app and wait.
home_destinationThe test destination matches the device's home area — test with a faraway city.
local_cooldownA notification was shown recently. Use testing.force while developing, or wait out the cooldown.
missing_destinationThe travel context needs at least an address, coordinates, or hotel name.
partner_config_disabledScheduling is switched off for your account — contact your Stay22 account manager or support@stay22.com.

Also worth knowing while testing:

  • Setting a new travel context replaces the pending notification — you'll see a notificationCancelled followed by a fresh notificationScheduled.
  • Stay22.clearTravelContext() drops the context and any pending notification, which is a clean way to reset between test runs.

Still stuck?

Enable testing.showLogs, reproduce the issue, and send the console output along with your aid to support@stay22.com. The GitHub READMEs (Android, iOS) also document the full API surface if you need details beyond these guides.

On this page