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:
| Symptom | Check |
|---|---|
| Nothing happens at all | Is Stay22.isEnabled set to true? Did Stay22.initialize run at app launch with your aid? |
notification_permission_denied | The user declined the OS prompt — call Stay22.requestNotificationPermission() at a better moment, or guide them to system settings. |
app_foreground | Notifications only deliver after the user leaves the app. Background the app and wait. |
home_destination | The test destination matches the device's home area — test with a faraway city. |
local_cooldown | A notification was shown recently. Use testing.force while developing, or wait out the cooldown. |
missing_destination | The travel context needs at least an address, coordinates, or hotel name. |
partner_config_disabled | Scheduling 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
notificationCancelledfollowed by a freshnotificationScheduled. 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.