Please provide the following:
- SDK Version: 35.0.0
- Platforms(Android/iOS/web/all): Android, iOS
I have a problem similar to this one - Pop-up / Heads-Up Push Notifications on Android - #2 by jamesattard
I am on Android 6
In my App at the top I do this:
if (isAndroid) {
Notifications.createChannelAndroidAsync('updates', {
name: 'updates',
sound: true,
priority: 'high'
});
}
And then when I send a notification from my server I do this:
const { Expo } = require('expo-server-sdk');
const expo = new Expo();
await expo.sendPushNotificationsAsync(expo.chunkPushNotifications([
{
to: token,
sound: 'default',
title: 'test title',
body: 'test body',
_displayInForeground: true,
priority: 'high',
channelId: 'updates',
data: { foo: true },
}
]))
The notification comes up in the tray in the background, but it doesn’t popup. So the user never sees it unless he pulls the overlay menu from the top.
Any ideas on how to get the notification to actually pop?