React native Fire base Push notification not working in OPO,VIVO, MI when app is close - react-native

Fire base push notification is not working when app Killed or force stop in Mi, Vivo, OPPO.In my code, android firebase push notification is working fine in Moto g4 and Samsung, but it's not working in Mi, Vivo, OPPO when app is killed. But it's working when autoStart on. That means the background service killed if the app is autostart off. How can I solve this issue?
I already tried like following link oppo, vivo app kill notification not coming in android fcm. But it opens the settings and user needs to switch on option. However, I need automatically on that.

Related

application didReceiveRemoteNotification not called in particular occasion

I am writing an app which will receive remote notifications sent from Firebase.
It works perfectly fine when I first install the app on an iPhone, the notification can be received no matter the app is in background or foreground.
However, when I killed the app and restarted it, then press home button again to send it to background, the app can no longer receive notifications in background state, and can only receive on foreground.
Please help. Thanks in advance!

Does PushNotificationIOS work on the Simulator?

I am trying to show a notification on my react-native app using react-native-push-notifications which is based on PushNotificationsIOS that ships with React Native. The problem is that nothing happens, no error, no notification, nothing.
I am not sure whether I made an error when programming the notification, or it just doesn't work on a simulator.
Thank you!
I've figured it out.
To send local notifications, we can use the simulator. When using react-native-push-notifications, I forgot to add the configurations of the push notifications to the same component that was attempting to schedule the notifications and that is the reason why it did not work.
However, to send remote notifications we need to get the device ID, but the simulator doesn't have one because it is not a real device, for that reason we cannot receive remote notifications from a server and display them using an emulator.
Using the notification in iOS need device token,but simulator doesn't have one ,so it doesn't work.
Since Xcode 11.4 - IOS Simulator support Push Notification as well

WatchOS app keeps crashing when being opened from remote notification

WatchOS app works normally if being opened from home screen. If I try to open it from remote notification screen (by tapping title label) two app behaviors can be spotted:
If application was loaded previously (I don't know how to name it, maybe better to tell that app is not killed by system or still present in memory). In this case application will load normally and do some action if asked (for example open some Interface Controller and show remote notification details).
If application was launched long time ago (or killed by system, unloaded from memory, in my case I'm stopping it in Xcode). If app receives remote notification in this state after tapping on title label of notification scene it will try to load for some time and finally crash (this may take 1sec or 1min). Or it will stuck with loading indicator shown - what is interesting that in this case if I'll try to attach watch extension process to Xcode debug it will show that app is launched and works (for example I can send some data from parent iOS app and watchOS app will receive it - triggered method in Extension delegate and do some stuff).
Googling I have found that watch apps can be killed by system if they take to much power when being launched, so I tried to remove any load while app is starting itself but with no success - it still keeps crashing.
The only close to mine situation that I've found so far was a topic in apple developers forum:
https://forums.developer.apple.com/thread/20553
I have been spotting the same logs like in topic when watching how watch app behave in Xcode/Devices, but after updating to WatchOS 3 (now 3.1 beta) and using new Xcode 8 (now 8.1 beta) I can't see any logs from WatchOS at all (just some system messages that watch screen was turned of and on).
Have any one spotted such issues while working with watchOS remote notifications? Any suggestion where to search for solution?

Titanium iOS auto restart application in background once swiped off from background

I am working in an application that detects any Beacons nearby and gives and alert in the form of local notifications for iOS. I used TiBeacons library for titanium which did the work but I am right now stuck with an issue where I need to keep the Application running even when the user swipes off the application from background.
I was able to make it work in background which is the paused state,but is it possible to make it restart itself in the background when the user swipes the app from the background processes running,maybe with a delay if not promptly?? Thanks
There is no way to restart application after user removed it from a memory. This would be huge security bridge allowing developers to do lots of evil things to customers' devices.
You can run your code only when app is in foreground and background but never when it's killed.
You can try activate your app by receiving notification from Apple Notification Center Service:
The purpose of the Apple Notification Center Service (ANCS) is to give Bluetooth accessories (that connect to iOS devices through a Bluetooth low-energy link) a simple and convenient way to access many kinds of notifications that are generated on iOS devices.
The ability to detect iBeacons after the app was killed in the task switcher was only added in iOS 7.1. Also, I believe this functionality requires that beacon monitoring be set up with the app's main AppDelegate object as the CoreLocation delegate. I do not know much about Titanium, but glancing at the source, it appears it does not do this, and instead uses a different class as the CoreLocation delegate. This may explain why this does not work for you.
If my suspicion is true, you would not be able to detect after the app is killed using an unmodified version of that library.
Since I am not a Titanium expert, it would be best if someone who knows more about it could confirm or refute my suspicion.

Function 'didFinishLaunchingWithOptions' getting invoked inappropriately

I am using cordova 2.1.0 for my IOS app development.
I connected my IOS device to a MAC processor and installed/initialized my app running in xcode or dragged it from itunes folder. Now i physically disconnected my device from the processor and through wifi enabled in the device, sent notifications/messages through APNS to the device. I was able to successfully receive notifications in the device. Now after some time, i reconnected the device to the processor, which lead to a problem of the app launching again and calling 'didFinishLaunchingWithOptions' method again, which is not desirable as the launch/initialization should happen only once. This behaviour is random ie. every time when i disconnect/reconnect, it is not happening, only sometimes. Why is this happening. What could be the reason for this random behaviour.
Any help will be appreciated.Thanks
didFinishLaunchingWithOptions: is called every time the app is launched. When you run your app from Xcode, and disconnect the device, it kills the app. So, when you launch the app with the device disconnected, it starts the app again, which calls didFinishLaunchingWithOptions: when the app finishes launching. The same thing happens if you run the app from Xcode, and run it again the same way.
EDIT :
Not sure if it's clear, but didFinishLaunchingWithOptions: is not called if you quit the app (press the home button) and call it back without killing it.