Not getting GCM on sendbird android v3 - sendbird

I've upgraded to sendbird's android v3 library and am unable to get GCM notification event after registering serverkey on dahboard, following all steps on registering my GCM id from the app.
For the demo app provided on github, I am able to receive it only after the app is killed forcefully.
any directions ?

You can receive GCM only sendbird is in disconnected state. This can be done you call SendBird.disconnect().
By the way, the latest SDK supports automatic background checking so you don't have to call SendBird.disconnect() to receive GCM.
https://github.com/smilefam/SendBird-SDK-Android/tree/master/com/sendbird/sdk/sendbird-android-sdk/3.0.2
Please upgrade SDK and try it.
Thanks.

Related

Firebase Push Notification not receive Message on ios with flutter

I have flutter application use firebase messaging, on android platform notification get normaly, but for ios platform i didn't receive any message from firebase, i have followed firebase documentation,
i add APNs Auth key to firebase
setup background mode on my runner sign & capabillities
and on my AppDelegate.swift i am add
result to get token from firebase is success and i send it to my server
and still i cannot got notification from firebase, even i send directly from firebase admin console, please help if have a same problem, or have advice for fix this problem, thank you.

iOS Firebase Push Notification - Token received but push not working

I am currently developing an App with push notifications using Capacitor. I followed their guide for the implementation online and everything works so far. I am receiving a token & it is successfully sent to my backend. The problem I am facing right now is that when I try to send a push to that deviceToken via firebase admin SDK the push never reaches my phone (the same is true, when I try to target the whole iOS platform via Firebase Cloud Messaging).
I am not sure why I don't receive any pushes (I have tested it on 2 different devices -> both receive their pushToken, but none of the receive pushes, everything works just fine on android). Do you have any ideas what the problem might be here?
you should enable the capability of push notification and enable background mode such as:
!(https://i.stack.imgur.com/DGZ7h.png)
!(https://i.stack.imgur.com/z7ITq.png)
and you should go to your
firebase project settings/cloud messaging/
add or insert your APNs Authentication Key
from apple developer account

OneSignal subcribers not updating after switching from Pushwoosh

I have an app which had 7,000 users subscribed on Pushwoosh. We switched from Pushwoosh to OneSignal and updated our app with OneSignal documentation. New users downloading our app are getting subscribed to our push notifications but the old ones are not getting updated.
Do we have to trigger permission to send push notification again ? Does Apple allow to do so ?
What is the workaround this ?
Notification Permissions & APNs Token
Notification permission is granted at the app level, so no matter what SDK / library is in your app it can read if the user has already accepted notifications and the APNs token.
The OneSignal iOS SDK does automatically check if permission is already granted and attempts to register for an APNs token. The OneSignal SDK will register the device with the app_id you put in your app and create a new player if it is the first time you opened the app since you added OneSignal.
APNs will return the same push token each time unless the user has fully uninstalled and reinstalled your app. However just in-case Apple were to deiced to rotate the token the OneSignal SDK does call the APNs register API to be sure.
Finding & Fixing The Issue
To find the issue I recommend the following;
Only include one push notification SDK in your app at a time, it possible for SDKs to have conflicts due to method swizzling or other possible issues.
In this case remove the Pushwoosh SDK if you using OneSignal.
Try to reproduce the issue on a test device by upgrading your app.
When testing the upgrade, I recommend enabling verbose logging in the OneSignal SDK.
OneSignal.setLogLevel(.LL_VERBOSE, visualLevel: .LL_NONE)
Also observe at this point if you are getting a user on the OneSignal dashboard.
If there was an issue getting an APNs token by the OneSignal SDK there will still be a user, they will just show as unsubscribed with details why.
This all depends on how you are getting the device push token from the user's device and sending it to OneSignal. A common mistake is to only get the device token the first time the user accepts the notification permission prompt. However, the device push token is subject to change randomly at any point in the future which can result in outdated device push tokens on the server used to send notifications.
To combat this, it is suggested to register for push notification every time the user launches the app. While this won't re-prompt them to accept notification permissions, it will fetch the device push token again. The push service you are using should then be updated with the new device token.
TL;DR: at every app launch register for a device push token and send it to your push server.

Firebase Cloud Messaging and IOS strengths and weaknesses

I have built an application using phonegap. So far, all of the application features work in both Android and IOS. Now, I would like the app to receive push notifications.
I plan to use Firebase but a friend has warned that FCM can only send push notifications to IOS if a user manually types a message into the FCM console (As in there is no API which would allow my server to send push notifications to IOS manually). The docs haven't helped me prove or refute this warning. Can anyone tell me if I can programmatically send push notifications to IOS using Firebase?
Yes, it is possible to send messages to iOS through Firebase Cloud Messaging through its (server-side) API. You can either just target iOS devices, or send a message to both iOS and Android devices with specific details for each platform.
For full documentation, see https://firebase.google.com/docs/cloud-messaging/send-message.

GCM (Google Cloud Messaging) for iOS apps

I am working on an iOS app, in which my client is asking for implementing GCM (Google Cloud Messaging) on iOS platform. I need to be sure if it can be done on iOS. As we use APNS for Push Notifications in iOS.
Can anyone suggest me about this.
Thanks In Advance.
Please check this link it contains all steps to integrate GCM in iOS and requirement is you need to set up CocoaPods dependencies.
https://developers.google.com/cloud-messaging/ios/start
https://developers.google.com/cloud-messaging/ios/client
Its a late answer.But I just started working on GCM on iOS.SO I thought to answer this question as it might help someone.
The following flow chart gives a brief idea on GCM.
GCM can can be used to send updates to a single registrationID,a group
to registrationIDs,or we can register a topic in the GCM server and we
can send updates to all the devices subscribed to that particular
topic.
Just follow the steps and you will find GCM integration easy.
STEP 1: Do watch this video completely : https://www.youtube.com/watch?v=gJatfdattno This gives the basic idea on how GCM works.
STEP 2
Goto this link: https://developers.google.com/cloud-messaging/ios/client
This shows clearly how you should configure the project.The main and important part is properly configuring the GCM config file.
You just have to upload apns certificate (developer and production) and get the gcm config file and add it to your project (drag and drop to your project navigation pane).
The following code which you should call in the didFinishLaunchingWithOptions will automatically fetch the _gcmSenderID from the config file.
_gcmSenderID = [[[GGLContext sharedInstance] configuration] gcmSenderID];
Another important part is properly setting the kGGLInstanceIDAPNSServerTypeSandboxOption to yes or no in didRegisterForRemoteNotificationsWithDeviceToken depending on which environment you are using the code(development or production).ie; kGGLInstanceIDAPNSServerTypeSandboxOption key should be YES if you are using it for testing.
Here is a sample quick start project for you to start with.(both swift and objective-C).Everything is well explained in this sample app.
Let me know if you have any doubts.
Regarding actual communication, as long as the application is in the background on an iOS device, GCM uses APNS to send messages, the application behaving similarly as using Appleā€™s notification system. But when the app is active, GCM communicates directly with the app
.
The data payload and notification payload are both applicable on iOS & Android. On iOS the difference is that notification payload is sent through APNS while data payload is sent through GCM's own connection which is only there when app is in foreground.

Resources