ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

Can not receive remote notifications #266

Closed abdoerrahiem closed 2 years ago

abdoerrahiem commented 3 years ago

In my project I have to use local notification to show notifications, because I can't receive from remote notifications. But it doesn't work when the app is killed. Why can't I receive remote notifications?

abdoerrahiem commented 3 years ago

This is my AndroidManifest.xml https://shrib.com/#YellowCrownedNightHeron6yMYXEy

DaveLomber commented 3 years ago

Hi @abdoerrahiem

did you follow the https://developers.connectycube.com/reactnative/push-notifications guide?

abdoerrahiem commented 3 years ago

Hi @abdoerrahiem

did you follow the https://developers.connectycube.com/reactnative/push-notifications guide?

Yeah I did

abdoerrahiem commented 3 years ago

It was successful... When I send push notification from admin panel it just appears on the console.

DaveLomber commented 3 years ago

So it works well now?

abdoerrahiem commented 3 years ago

So it works well now?

No.. I can't receive remote notification as before

DaveLomber commented 3 years ago

Do you use Expo or RN CLI?

Let's sumamrize:

1 - you have subscribed to push notifications via API 2 - now you send a push from admin panel - what status you receive? There is a file you can download and see the response 3 - but pushes do not come on device

correct?

abdoerrahiem commented 3 years ago

Yeah correct

DaveLomber commented 3 years ago

@abdoerrahiem

I mean

do you use Expo or RN CLI?

abdoerrahiem commented 3 years ago

RN CLI

UmerQur3shi commented 2 years ago

@DaveLomber having the same issue, notifications are received as silent data only, no popup for notification, I create localNotification when the data is received to make it work, but there is nothing I can do to get notifications when the app is killed.

NIDHINgl commented 2 years ago

@DaveLomber, @TatankaConCube, I'm also facing the same issue, Notification was not receiving, then I added send notification functionality right after the user send a message, then itself the notification started receiving silently it's not showing alert or badge, I have triggered local notification in OnNotification, but when the app is killed not able to receive a notification. I tried from the admin panel also, status showing as sent but not receiving. I have followed all the steps from the documentation.

UmerQur3shi commented 2 years ago

@DaveLomber, @TatankaConCube, I'm also facing the same issue, Notification was not receiving, then I added send notification functionality right after the user send a message, then itself the notification started receiving silently it's not showing alert or badge, I have triggered local notification in OnNotification, but when the app is killed not able to receive a notification. I tried from the admin panel also, status showing as sent but not receiving. I have followed all the steps from the documentation.

There must be some issue with the configuration. Have you successfully registered for push notifications for connectycube? And you have to use local notification to display the silent data as notification popup if the app is active.

NIDHINgl commented 2 years ago

@UmerQur3shi, I am able to handle when the app is handled, only issue when the app is killed, all the configurations are done based on the documentation

UmerQur3shi commented 2 years ago

@UmerQur3shi, I am able to handle when the app is handled, only issue when the app is killed, all the configurations are done based on the documentation

You wrote above that you're sending notifications manually when you send a message, that means it's not configured correctly. The issue is with the configuration, I guess you're not registered for connectycube push notifications. What result you get when you do ConnectyCube.pushnotifications.subscriptions.create(params) ?

NIDHINgl commented 2 years ago

@UmerQur3shi, You mean from the front-end we don't need to manually send requests it'll handle from connectycube right. ConnectyCube.push notifications.subscriptions.create(params) response is success, i can see the token updated on admin panel

UmerQur3shi commented 2 years ago

@UmerQur3shi, You mean from the front-end we don't need to manually send requests it'll handle from connectycube right. ConnectyCube.push notifications.subscriptions.create(params) response is success, i can see the token updated on admin panel

Yes, ConnectyCube sends notification to the receiver automatically. You don't have to code it. Did you add a channel while configuring push notifications?

NIDHINgl commented 2 years ago

@UmerQur3shi, yes, I'm using some other services, push notification working fine ther

UmerQur3shi commented 2 years ago

yes

Idk where you went wrong, for me it's working fine. I tried it with both react native push notifications and react native firebase/messaging.

NIDHINgl commented 2 years ago

ok,

yes

Idk where you went wrong, for me it's working fine. I tried it with both react native push notifications and react native firebase/messaging.

ok, we don't need any additional configuration right, the steps those are mentioned in doc is enough right

UmerQur3shi commented 2 years ago

ok,

yes

Idk where you went wrong, for me it's working fine. I tried it with both react native push notifications and react native firebase/messaging.

ok, we don't need any additional configuration right, the steps those are mentioned in doc is enough right

Yes.

NIDHINgl commented 2 years ago

@abdoerrahiem did you resolved the issue ?

DaveLomber commented 2 years ago

@NIDHINgl @UmerQur3shi @abdoerrahiem

guys, the issue is addressed in new MR https://github.com/ConnectyCube/connectycube-reactnative-samples/pull/296

Please read the details and provide a feedback/comments if any