在 Android 上,我的博览会应用程序 在一定时间(如 3-5)不活动并且手机被锁定后,不显示 通知(或者他们很晚才收到)。
一旦我解锁手机,我就会立即收到待处理的通知!
当手机解锁时,所有通知都会正确接收,当我在前 3 分钟(左右)内重新锁定手机时,通知也会收到。刚不活跃后就不会出现了。我不确定这是否是某些 Android 设置(这种情况发生在三星 A9 和小米 Pocophone P1 上)还是我可以在我的应用程序中设置的东西......在
iOS 上一切正常。
您知道问题出在哪里吗? Facebook、Instagram 等其他应用程序运行良好。
https://docs.expo.dev/versions/latest/sdk/notifications/#notificationchannelinput
Notifications.setNotificationChannelAsync('messages', {
name: 'messages',
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: '#FF231F7C',
sound: 'ring.wav',
lockscreenVisibility:Notifications.AndroidNotificationVisibility.PUBLIC
});