flutter Not getting Notification in Oppo and Vivo - flutter

I am using FCM to send notification. It is working fine on Samsung and mi devices but, not getting a notification in Oppo Vivo.

OPPO and VIVO always have issue with Notifications. They restrict app from doing any background task for saving battery. This is not just with Flutter but with native development too.
Solution:
Turn off battery saving mode of the mobile.
Remove app from restricting using battery in background.
Turn on Autostart for the app.
You will find respected intents for these setting screens.

I have some issues in Oppo user, but ignore this problem because they had restrict the app for saving battery feature. Even app like Whatsapp, notification become delay in oppo.

Related

Receiving call same as WhatsApp in Flutter

I am implementing a video call feature in Flutter with the help of Firebase Cloud Messaging,
it's working fine in foreground.
my doubt is
while app is in background I need to get a receiving call same like as WhatsApp in both Android and IOS .... is it possible in flutter?
yes. it is possible by the combination of push notification and flutter_callkeep to show the upcoming call screen.
Or if you want to run the background process you need to refer to Method Channels, and here is a post about creating a service for running app in the background. also background_fetch is a useful package for background process.

Flutter with Agora SDK: Can't listen audio after 1 min of locking the screen

I have implemented the Agora SDK with my Flutter app. Now everything works fine with audio and video call. But during the audio call when I press power (lock screen) button, then after 1 min I can't listen audio of that call. Also then I pressed that lock screen button again and unlock my screen and I can listen that audio again.
This issue comes in my android app generated by flutter.
Can anyone help me in this?
Executing an app in the background (when the phone is locked) is something which OS providers don't appreciate. Hence there aren't any method to run your app in the background. This is one of the ongoing issues in the flutter SDK https://github.com/flutter/flutter/issues/3671
That being said you can still add a logic to your code or probably a timer that can help you with this. You can refer this solution over here : solution
You need to use foreground service. I have same issue, solved it out by use of foreground service. When you start voice call, start the foreground service. When you end the voice call, destroy the foreground service.

Reading accelerometer data while the app is running in background

I want to build an Ionic app that can still use accelerometer data while the app is minimized (runs in the background).
I have tried using:
The Ionic Device Motion Plugin
https://ionicframework.com/docs/native/device-motion
The Device Motion Web API that is supported by browsers https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent
The Generic Sensor API that is documented to be supported by Chrome browser https://developers.google.com/web/updates/2017/09/sensors-for-the-web
The first two work in the foreground but won't work while the app is in the background (the accelerometer readings are paused and are resumed while on the foreground again). The Generic Sensor API won't work at all, even if I use this polyfill: https://github.com/kenchris/sensor-polyfills
I have also tried the Ionic Background Mode plugin, however, the accelerometer reading are still being paused in background.
https://ionicframework.com/docs/native/background-mode
How can an Ionic app use the accelerometer while in background? Any plugin that I am not aware of its existence (e.g., the Ionic Background Geolocation lets the app receive locations while in background)? Any other way?

Apple Push Notifications won't arrive when screen is unlocked

I've been trying to find something about this problem for a few days, but without any useful results. I'm working on a VoIP app for iOS (using an iPhone 4 running iOS 6.0) in Objective-c which uses remote notifications to notify the user about calls when the client is in background.
My issue is quite strange: When the app is in background and the screen is locked, notifications arrive and work perfectly - they ring, and open the app when opened. But when the application is in background, and the screen is unlocked - for example, we're on the home screen - notifications simply fail to appear, not giving any sign that something happened.
Anybody got any ideas where to look around? The app code handles push notifications correctly when they appear, so that shouldn't be an issue. The notifications get out of our server, so I'm starting to think that there is something about the device's settings. The app is set to a "banner" alert style, and its notifications are enabled.
When the app is running in the background, the notification does not appear. You need to catch it in the App Delegate application:didReceiveRemoteNotification:.
Implement this method and put a UIAlert to see when the notification arrives.

How are iPhone apps able to generate notifications while in standby?

I'm a bit confused.
It says on many places, that on IOS you can't make your app work if the phone enters standby mode unless you use push notifications.
I did encounter some apps that do succeed this in IPhone 4
(such as ihandy alarm clock http://www.ihandysoft.com/alarm_clock.html)
It even beeped on standby when I was in airplane mode!
Can someone straighten my thought regarding this issue?
There are two kinds of notification in iOS: push notification and local notification.
In your case, the app beeps while airplane mode is on, it might use local notification rather than push notification.
According to http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html, “Apps that receive regular updates from external accessories” can continue to run in the background.