Hello,
With target sdk 33, we need to get permission for notifications as I understand. But also @Erel said that it is not needed for foreground service notification.
I am confused here. I am using new receivers for firebasemessaging module. I send notification with php using firebase cloud messaging. Do I need to implement to request permission?
@asales said:
So it means we need to implement this if we need to show it in status bar. What I need to achieve is, I need the notification to be shown to user when the app is on background because it will be a price alert notification to user when the app is on background.
So, my .notify code is in a receiver module called firebasemessaging. Should I implement the code in this receiver module ? If I implement the code in receiver module, It is not possible to ask for permission when the app is on background so I am totally lost here. Like in the ios, when user first opened the app, I need to request permission. After that, I should be able to send messages before earlier like target sdk 31.
With target sdk 33, we need to get permission for notifications as I understand. But also @Erel said that it is not needed for foreground service notification.
I am confused here. I am using new receivers for firebasemessaging module. I send notification with php using firebase cloud messaging. Do I need to implement to request permission?
@asales said:
Only if you will show a notification.
If you don't have permission, still receive the push notification, without show the notification in the statusbar.
So it means we need to implement this if we need to show it in status bar. What I need to achieve is, I need the notification to be shown to user when the app is on background because it will be a price alert notification to user when the app is on background.
So, my .notify code is in a receiver module called firebasemessaging. Should I implement the code in this receiver module ? If I implement the code in receiver module, It is not possible to ask for permission when the app is on background so I am totally lost here. Like in the ios, when user first opened the app, I need to request permission. After that, I should be able to send messages before earlier like target sdk 31.
Last edited: