Flutter_Messaging Do Not Play Sound on a Real Android Phone - android

Currently, I have implemented the Firebase Cloud Messaging on my application. The notification is function in foreground and background.
When I run the app on emulator, the sound is play with the default music. Once I run on a real Android device, there is the notification but without any notification sound. Can someone show me where is the problems?

Set a higher priority in the JSON you send to the client, you have all the documentation here:
https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message

Related

REACT-NATIVE Receiver notification and play a sound when app killed

i want to build a messaging and calling app. currently i have created message notification but and i want when there is incoming notification i can play ringtone like facebook messenger voice call, but i don't have any solution for this yet.
Can someone show me the solution for this app. I'm a newbie so I don't have any solution yet, Thanks for support.
I'm using: react-native 0.60.5

Flutter Push notification to iOS & Android without firebase?

I wonder how to push notifications to my Flutter app users in both Android and iOS devices Without using any external service like Firebase or OneSignal?
I want to implement a code in PHP which can send push real time notifications to all/spesific users in my Flutter app which works in both Android and iOS.
I found some solutions like flutter_local_notifications with workmanger which can fetch the API in the background only minimum 15 minuts. Workmanger is Not good solution because its work only during 15 min and it will consume the battery and internet.
I need an efficient solution to my flutter app for both Android & iOS devices, which can listen on real time to the coming messages from the server even when the app is closed.
How to fix that? thanks
iOS
You will always need to integrate with Apple's Push Notification Server (APNS) if your app needs make API calls in the background. The reason is that once an app is put into the background, iOS will often put the app to sleep soon afterwards.
The correct approach to this is to use a silent push notification to wake up the app. When received, no message is shown on device but the app get's about 30 seconds in order to make API calls.
In your case, the app can make the API call and then schedule a local push notification to display your message.
Background updates via push notifications
Scheduling local push notifications
Android
It looks like WorkManager is your best bet. I don't see how it can affect battery.
FYI
You don't need to use Firebase or OneSignal for push notifications, silent or otherwise. They are simply 3rd party services that interact with the official Apple or Google Push Notification Servers.
Unfortunately, I think this is not possible. Even OneSignal uses the Firebase API to deliver the notifications, as you can see here. For all other solutions, you will have to balance the update frequency with internet use and battery consumption.

How Facebook messenger make mobile calls in background?

How does the Facebook messenger establish video calls when app is in background?
I'm making an android video call hybrid app using webrtc and socket.io, the video calls works fine with app open but I don't know the best way to contact a target user if he's not in the app, my idea is to send a push notification to wake up mobile and enter in the app and then start the video call, the problem is if target user don't allow notifications.
I've already tested calls in messenger with notifications disabled and with the app in background and the call works the same. I can't find any explanation how messenger can start a call when the device is not awake.
Is a notification or a service that allows that?
Check out Firebase Cloud Messaging, it's what most people and what Google recommends to use to push notifications. However, that doesn't mean it has to be used to send notifications and it won't be blocked even if notification is disabled. You are able to send data payloads with FCM and handle them on your client with onMessageReceived with FirebaseMessagingService. For more details, refer to the documentation.

Never receive FCM notification if the phone was in energy saving mode at the time it was sent

I am developing an Android app whose main use is to be notified instantly of certain events.
I have a Huawei phone.
The app works well with FCM
I receive notifications in foreground and background, from FCM console and also from my server (PHP code)
The problem is:
I put my phone in ultra power saving mode.
After that I send a notification. FCM return success operation.
Finally I change my phone back to normal mode
I Never receive the notification. Not even if I open my app.
I already check my app in "Protected Apps"
I want to know how to fix this issue. It's an Android bug? It is only a problem of this device? I mean... I do not think my code is wrong... the problem is how the OS manage FCM, google play services or whatever... there is a solution? OR an alternative cloud message service that works well? Other apps like Whatsapp doesn't have this problem.
Thanks in advance

Android Silent Push

I am new to android and I'm playing around trying some features here and there.
I wanted to know what is the way to use silent push - meaning get a push notification on the device without any alarm, notification or vibration - i.e. without the user to be aware of it.
If someone have a tutorial he can refer me to I'll be more than gratefull.
The default push in Android (Google Cloud Messaging for Android) is a silent push.
You actually have to write code in order for the push notification to generate a notification, sound or any other effect noticeable by the user.
Read the GCM Guide.

Categories

Resources