Firebase Cloud Messaging Reports wrong - firebase

I am sending cloud-messages to my app but Firebase-CF-Reports tells me that they would not be received:
But I know for sure that some devices do receive them. e.g. my own. So something is going wrong here in the reports.
I read about this problem here and here but I already have an analytics-label that I send with my cloud-message.
This is how I sent my notifications with java-admin-sdk:
Message message = Message.builder()
.setTopic(topic)
.setAndroidConfig(AndroidConfig.builder()
.setPriority(AndroidConfig.Priority.HIGH)
.build())
.setApnsConfig(ApnsConfig.builder()
.setAps(Aps.builder()
.setMutableContent(true)
.setContentAvailable(true)
.build())
.putHeader("apns-push-type", "background")
.putHeader("apns-priority", "5")
.putHeader("apns-topic", "my.bundle.id")
.build())
.putData("\"content\"", contentString)
.putData("\"actionButtons\"", actionButtonsString)
.setFcmOptions(FcmOptions.withAnalyticsLabel("SendToAll"))
.build();
Also interesting is, that If I am not filtering for Platform/Channel (altough still filter only for my android app with Apps=) I get this:
But these numbers still don't make any sense. I also opened some notifications on my own device. And I can't believe that only 18 were received.
Has anyone an idea what I am doing wrong?
I use this fcm-sdk in my flutter app:
firebase_messaging: ^9.1.2

Despite I did not find this in the official documentation, I found information in this discussion in the comments to this answer here. Turns out that subscribing to a topic in FCM is not necessarily permanent. So don't subscribe users to a topic once. Instead do it on every app start, although it is
"not technically necessary. It may depend on your use case. For
example, if you want a global topic where all users are a member of,
you'd have to make sure that they are subscribed to it. Putting the
subscribe method when the app starts guarantees this."
-#AL.
Since I changed that, the Notifications are received by a lot more people than before. Only the open-count is still not working for me. It is always on zero.

Related

Missing videoTrack in a multitrack stream in Ant media server 2.4.1

We have a Multitrack web conference implementation using AMS 2.4.1 version. Its working great for our use case, except in one scenario. When there are N (< 3) number of users and they on there camera simultaneously, then few remote users are not rendered as we don't receive the video tracks for those users in newStreamAvailable. We only receive the audio track for those users. We are able to reproduce this quite frequently.
As a backup, I am trying to poll AMS using getTrackList with the main track Id to get all available streams, but I am not getting any message trackList
var jsCmd =
{
command : "getTrackList",
streamId : streamId, // this is roomId or main track id
token : token
}
Any insight would be helpful.
Thanks,
We were able to resolve the issue, posting here to help anyone who might be facing a similar issue.
With push notifications from the server, we might encounter issues when for some reason push operation doesn't succeed. In that case, it's better to have a backup plan to pull from the server and sync.
The Ant Media Server suggests pulling the server periodically for the room info. The server will respond with active streams and the application should synchronize.
For reference, please refer to following link https://resources.antmedia.io/docs/webrtc-websocket-messaging-reference

How do you "restart" receiving Firebase Alerts on short code 44398

I often use Firebase phone auth in my applications. I have one user who religiously sends "STOP" to all text messages. Big oops. Now she can not login to any application using the system...
Short code phone # = 44398
If the user types "STOP" to that short code, the system responds with:
Firebase: You are opted out and will receive no further messages. For
HELP, reply HELP. Msg & Data rates may apply
Type "HELP", the response is:
Firebase: For more info: https://firebase.google.com/support/ -
Msg&Data rates may apply.
My question. How do you "RESTART" the service? The Firebase support page offers no help here.
I've tried "GO", "RESTART", "UNSTOP". All of those fail.
Here's a posting on how Twilio addresses the topic. Twilio uses START, YES and UNSTOP to restart a service (on long code source). Each of those fail here.
Twilio also provides a link to standards for short code expressions., but I'm not seeing anything on restarting a service.
Here is a screen shot (of my phone):

Firebase, listening for a read

Is there any way of listening to a read on a reference?
E.g
user1 adds a readListener to ref/books/book1
user2 observes/reads ref/books/book1 and gets its value
user1's readListener is triggered
I haven't seen anything like it in Firebase yet, and I guess a workaround would be to have user2 set some ref/books/book1/read value, but I'm interested to hear if anyone has any other ideas.
Firebase is a fairly simple JSON database. There is nothing built-in to fire an event when another user has received specific data.
But as you indeed said, you can build something like that yourself. Most chat applications that need read-confirmation either do this per message or write a "last message ID that I received" marker.

How can I get alerted when the Firebase service goes down?

I know I can manually go to status.firebase.com but I need to be alerted immediately when my firebase app goes down and when it comes back up.
I thought I could possibly use dingitsup.com to send myself a notification, but i don't know where to point it.
I would also like to have the option of automatically displaying a message to my users when Firebase is down to let them know the system is down and its not a problem on their end. Is there a Zapier integration i could use to achieve this?
Any help would be great! Thanks
Programmatically, you could use a service like Pingdom to send yourself a notification, and could ping an endpoint on your-firebase.firebaseio.com/some-public-endpoint.json.
Also, #FirebaseStatus is a good resource actively updated by the Firebase folks.
Could you write something to use the connection state?
https://www.firebase.com/docs/managing-presence.html (broken)
new link: https://firebase.google.com/docs/database/web/offline-capabilities
I use something similar in my apps to detect if the user has a connection, and display a notice if they don't.
I just figured a way
Firebase.enableLogging(function(logMessage) {
if(logMessage && logMessage.indexOf("Long-poll script failed to load") !== -1 && navigator.onLine){
console.error('Its dead Jim! Firebase seems to be down for this user');
}
});
I'm not sure how firebase works under the hoods but I've seen users connected in a previously open tab and if they open a new tab firebase won't connect when it's down.
This logging function is called a lot, and when firebase is down our console.error will be call every ~5s or something.
Make sure to debounce whatever you'll do in the console.error's place.

Does the Xively API -> Product Management -> Devices -> Update a Device work for anyone?

As you know, Cosm just turned into Xively on Tuesday.
They've added APIs for Products and Devices, and I'm trying to connect to them.
I'm running into problems getting the "Update a Device" API to work. The specific API is documented here:
https://xively.com/dev/docs/api/product_management/devices/update_device/
Anyone else have problems getting this call to return anything other than a 500 error message: '{"title":"Oops, something's broken","errors":"We've been unable to complete your request due to a problem with our server"}' ?
it's probably best mailing support#xively.com with this question I think. I just tried making the serial number update request on one of my devices via the API, and it seemed to work ok; so if you mail them then they'll be able to investigate your specific device.

Resources