Testing & Troubleshooting
Test Capacitor notifications and investigate routing or scheduling failures.
Test mode
With the SDK initialized, enabled and permitted to notify, use an internal build:
import { Stay22 } from '@stay22/capacitor';
const listener = await Stay22.addListener('stay22Event', (event) => {
console.log(event.type, event.description);
});
await Stay22.setTravelContext({ address: 'Paris, France' });
await Stay22.forceNotification();forceNotification() evaluates the scheduling pipeline immediately with a short test delay, bypassing normal local gates. It needs a destination. A missing one produces a skipped event rather than a notification. Background the app and check the event description if nothing appears. The operating system can still delay or suppress display.
Tap the notification and verify that the booking experience opens with your partner attribution. Keep the test call out of public builds. Test normal timing in a build that does not call it. Remove the event listener when the developer screen closes.
Troubleshooting
| Symptom | Check |
|---|---|
not_initialized | Declare the native partner ID or await runtime initialization. |
| Native synchronization fails | Check the iOS deployment target and the Android minimum in the quick start. |
Android cannot resolve com.stay22:sdk | Add Stay22's Maven repository to the host app's repository configuration. |
missing_destination | Supply an address, hotel name or both coordinates before the force call. |
app_foreground | Leave the foreground for normal automatic scheduling. |
home_destination | Use a trip away from the IP-derived home city while testing normal behavior. |
| A tap opens nothing on iOS | Inspect isNotificationHandlerInstalled() and your notification forwarding. |
| Guest counts do not change | Clear and resend the complete trip. |
See notification routing when another plugin also handles local notifications.
Verify attribution before shipping
Use the exact partner ID (aid) Stay22 issued you. This plugin's native pins predate the unknown-partner-ID warning added in native 1.7.0. An absent warning does not confirm attribution. Ask Stay22 to verify the ID if uncertain.
If a valid ID containing capital letters produces partner_config_aid_mismatch, the wrapped native SDK predates the 1.6.5 fix. Contact support@stay22.com for the appropriate upgrade.
For support, include your plugin version, wrapped native versions, aid, reproduced steps and the stay22Event output. A queued notification alone does not prove delivery or a booking.