5

How to display time-sensitive notifications with full screen on Android when using React Native and OneSignal?

These notifications are ones when a call is received or when an alarm goes off and the app shows a centered full screen notification instead of tray notification. Is it possible to implement such a notification using React Native?

References in Android Docs:

  1. https://developer.android.com/reference/android/app/Notification.Builder#setFullScreenIntent(android.app.PendingIntent,%20boolean)

  2. https://developer.android.com/training/notify-user/time-sensitive#java

Naisheel Verdhan
  • 4,905
  • 22
  • 34
  • 1
    Did you manage to figure this out @Naisheel? – sanjaypojo Mar 03 '20 at 23:36
  • @sanjaypojo no, not yet. I'll add a bounty to this question today. Hopefully somebody can answer. – Naisheel Verdhan Mar 05 '20 at 07:31
  • Best and quick solution using OneSignal will be using https://onesignal.com/in-app It will help you send in app popup from One signal dashboard. But, if you want to customise it you can send a notification to user tray with Pending Intent and a deeplink. And when user clicks on notification, you can get Linking.getInitialUrl() on app start, which will be deeplink you have added in notification. After that you can put your logic to open popup. – Anurag Chutani Mar 05 '20 at 09:46
  • @NaisheelVerdhan Let us if you found any answer or how did to manage. – Balasubramanian Jul 17 '20 at 11:21

0 Answers0