You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@S00raj-hcbsOneSignal.getNotifications().addForegroundLifecycleListener() only fires when your app is in focus. If you want to handle the notification no matter that state of your app you will need to setup the OneSignal Android Notification Service Extension:
What happened?
i am unable to handle background notification
notificationBuilder = new NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle(name)
.setContentText("Incoming " + callType + " Call")
.setSmallIcon(R.drawable.cdoc_logo)
.setPriority(NotificationCompat.PRIORITY_MAX)
.setCategory(NotificationCompat.CATEGORY_CALL)
.addAction(R.drawable.btn_hangup, "Reject Call", cancelCallPendingIntent)
.addAction(R.drawable.btn_accept_call, "Accept Call", receiveCallPendingIntent)
.setAutoCancel(true)
//.setSound(ringUri)
.setFullScreenIntent(callDialogPendingIntent, true);
Steps to reproduce?
What did you expect to happen?
i want to call callservice class when come notification in background. Handle notification in background.
OneSignal Android SDK version
5.1.21
Android version
14
Specific Android models
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: