I'm using sample code available on connecty-cube GitHub repo. When I call to user who is on android phone doesn't receive the notification for call when app is in background. And when app is open user can see the incoming call. Constructor of PushNotificationsService run and I can see this console [PushNotificationsService][constructor]. But inside _registerBackgroundTasks() function [JSNotifyWhenKilledTask] notificationBundle console doesn't run. I do get UDID for channels APNS, APNS VOIP and UDID for channel FCM in connecty cube dashboard.
So that's how I figured out the problem.
Make sure you have properly configured each step of every required library for connecty-cube.
Follow the docs
After that I checked sdk version of firebase on firebase console.
It stated classpath 'com.google.gms:google-services:4.3.13' in (<project>/build.gradle). But mine was classpath 'com.google.gms:google-services:4.3.10'. And because of that notification was not appearing. Now it's works.
I assume you are referring https://github.com/ConnectyCube/connectycube-reactnative-samples/tree/master/RNVideoChat
I suggest the following:
follow Getting started guide https://github.com/ConnectyCube/connectycube-reactnative-samples/tree/master/RNVideoChat#getting-started and make sure you have google-services.json properly located
Re-check https://developers.connectycube.com/reactnative/videocalling?id=receive-call-request-in-backgroundkilled-state where it describes how BG task works
Related
I am sending push notification using firebase console and i am getting "0% of potential users are eligible for this campaign: 0". and push notification is not displaying in mobile..If anyone got same experience and solve issue then please suggest me how can i solve this issue. I followed all the thing..that i added json file that i got from firebase.
Please check for the following:
Have you configured your android package name correctly.
Did you place the google-services.json file in android/src folder.
Make sure you have done all steps present in this link (If you using android studio i suggest going with option 2)
Get user token to send firebase message Follow the steps
After all these if you still can't receive push notifications try setting channelid in advanced messaging options
Refer https://firebase.google.com/docs/cloud-messaging/android/client link step by step and you will be good to go for your push notification using fcm and if you already implemented the basic things then compare your code with the sample code step by step mentions on the link. you must find out the error. let me know if it resolves your issue.
Go to Build --> clean project -->Rebuild project
(Build is at top in android studio)
Why it was not working - You must have had deleted google-services.json file and re-added it.
Make sure you have only one firebase project configured for this app (if no then delete one you dont plan to use)
Go to firebase setiings -> Left top angle -> settings icon -> Project settings ->
scroll to bottom, then make sure to add SHA certificate fingerprints Type. How to get it
Then (still on this page) press See SDK instructions button. And place google-services.json file in your project.
If all this steps passed for you and you still getting this error then just wait a little bit, for me it take 2 days, before it started working.
I was asked to develop a sample app integrated with Amazon Pinpoint. Since I am not a pro at developing apps, I decided to follow this simple tutorial and develop the app following the steps described in it. The only differences are that, instead of using an emulator, I executed the project in my own cell phone (a Xiaomi Redmi 4x) and instead of GCM, I used Firebase.
At first, it seemed to work perfectly, but when I moved the app to the background and went back to my homescreen, I could no more receive push notifications from my app. When the app is open and running, everytime I send a push notification a pop-up appears with Title "New Notification" and buttons "Ignore"/"View". But when in background, nothing is visible in my system tray!
Also, if someone knows which part of the code is responsible for this notifications, just warn me and I upload it here.
Okay, so after some tests I made it work (not through console, but through CLI). To do so, I followed some steps I found this question, that took me to two other documents: one from Amazon teaching how to send push notifications through CLI and a simple but very detailed tutorial of phonegap-plugin, the plugin used in our Ionic application to process the pushes.
First of all, replace the phonegap-plugin in your app with the master version avaliable in the github link I sent you.
Then, putting all those information together, I figured out how to write a .json file containing the information we need to send the pushes. Here is a sample of the code I used:
{
"MessageRequest": {
"Addresses": {
"YOUR_DEVICE_ADDRESS_HERE": {
"ChannelType": "GCM"
}
},
"MessageConfiguration": {
"GCMMessage": {
"RawContent": "{\"data\":{\"title\":\"StackOverflow rocks!\",\"body\":\"Am I right?\",\"actions\":[ { \"title\":\"Yes!\", \"callback\":\"app.yes\", \"foreground\":true }, { \"title\":\"No!\", \"callback\":\"app.no\", \"foreground\":false }]}}"
}
}
}
}
As you can see, to change the content in the push notificationm, you'll have to edit it's "RawContent". To do so, use the phonegap-plugin tutorial I sent you and find out how to do the alterations you wish.
Last step: once you updated your plugin version AND saved the code above in a .json file (let's call it test.json), you can send it to your phone oppening command line in the folder containing your .json and writting:
aws pinpoint send-messages --color on --region YOUR_SERVICE_REGION --cli-input-json file:///test.json
This should do the trick! Hope it works for you. If any doubts, just let me know!
I've followed the guide in OneSignal's documetation, i've setup the sdk and everything, yet, sending a notificaion through code seems to not work at all, not by a specific tag and not by "All Users" segment example which OneSignal provided in their documentation.
Tho, through their dashboard- it works perfectly.
I've doubled checked all the grandle setup part and stil...
Any idea why that can be happening? what should I check next?
(I didn't attach my code here cause it's an exact copy of OneSignal's code in their documentation)
Thank :)
EDIT: i've noticed that when I send push notification through code- it isn't being shown in the OneSignal's dashboard. So it means something is wrong with the code, tho again, it is similar the the one inside thier documentation (except that i've changed there the ONESIGNAL APP ID
and REST API KEY, as they requested).
Any ideas? tnx.
This is a Xamarin.Forms app running on Android, based on the Azure getting started Mobile App example.
I'm trying to register a device's id for notification services. Originally I was getting unauthorized, so I relaxed authorization settings on the backend. Now I am getting this error and cannot find a reason why.
I checked and double checked that notification hub has the correct Firebase details that align with the app and cannot see what the problem is here, any help appreciated.
John,
If you set WEBSITE_PUSH_ENABLED=false in your appsettings, does the problem go away?
Can you check your Mobile App's app settings?
Specifically, I am looking for the existence of the app setting "MS_NotificationHubName". If that app setting doesn't exist, you need to add it, with the name of your notification hub.
There is a bug in the Azure App Service Push blade right now. A fix is being rolled out. In the interim, instead of using RegisterAsync(), use the method described in the book http://aka.ms/zumobook - chapter 5.
I am following Android Push Notifications using Google Cloud Messaging (GCM) to implement GCM with my application it was working fine on single device (Galaxy S) when i tried to test it with another device( Galaxy Tab 7') its generating error.
handleRegistration: registrationId = null, error = INVALID_SENDER, unregistered = null
here is the Log which i am getting
V/GCMRegistrar(5649): Registering app my_maypackage of senders APA91bHvzZbO_nyYvaA_QRGDaV-wRAYKjt0qJSQmzPUi2unqG7j0OGuyhVY1A3zh-ZfnA0XT0ffgyKypVJ_5owLZvZBNGARpTBkBg9ED8gVVCDejaIpShghq_tXGhMnFQEufwdCL1ibm
V/GCMRegistrar(5649): Setting registeredOnServer status as true until 2013-04-02 11:02:07.847
V/GCMBroadcastReceiver(5649): onReceive: com.google.android.c2dm.intent.REGISTRATION
V/GCMBroadcastReceiver(5649): GCM IntentService class: my_maypackage.GCMIntentService
V/GCMBaseIntentService(5649): Acquiring wakelock
V/GCMBaseIntentService(5649): Intent service name: GCMIntentService-980172650021-7
D/GCMBaseIntentService(5649): handleRegistration: registrationId = null, error = INVALID_SENDER, unregistered = null
D/GCMBaseIntentService(5649): Registration error: INVALID_SENDER
I/GCMIntentService(5649): Received error: INVALID_SENDER
V/GCMBaseIntentService(5649): Releasing wakelock
Note: both devices are configured with same gmail account.
Log is showing incorrect sender ID. it should be taken from Google api project url. e.g
https://code.google.com/apis/console/b/0/#project:65464654646546
then 65464654646546 is sender ID.
For me what did it was enabling the "Google Cloud Messaging for Android" from the Console's API section:
[Adding to #spanjeta's answer:]
The problem is that it’s not trivial to get the project number, due to Google ever going modifications of the developer console. While Google was kind enough to give developers the possibility to declare a friendly/textual id for their projects, they didn't update the GCM documentation in that this cannot replace project ID in a GCM client.
When you do that (give the project a textual name/ID ) - you cannot use it, because you will get an INVALID_SENDER error.
You must get the pure numerical project ID somehow.
So how do you get the project number? You need to get somehow to the old developer console.
The following way works (for now):
Yo go to The developer console → Your Project → APIS → Google Cloud Messaging for Android → Quota
Then a new, old google devloper console tab will be opened with the following URL:
https://code.google.com/apis/console/b/0/?noredirect#project:YOUR_PROJECT_NUMBER:quotas
Then, use YOUR_PROJECT_NUMBER as the GCM SENDER_ID in your app.
I just wanted to share with you that I ran into this same problem just now.
GCM push worked perfectly fine before, nothing's got changed, and all of the sudden our users flushed back with complaints about not getting push notifications.
So I did check out all the StackOverflow thread re. this issue and still couldn't figure things out (had the app id / keys all correctly input, code's perfectly fine, even tried out on the Google demo and blah blah blah)
So in an act of desperate I went to the dev console and disabled GCM, then re-enabled it... everything just worked!
There is a project ID and the Project Number shown on the top of the Project Dashboard.
Project ID: aaaa-bbb-000000 Project Number: 00000111112
You have to use the numeric Project Number as SENDER_ID.
maybe you need change the GOOGLE_PROJ_ID
First
Second
Good Luck!!