I have not found a solution only a few things that could be related, If not for something in the apps code that might have depreciated. Google placed new restrictions in Jan 2019 on some apps in their app store. Amcrest tech or the app developer who uploaded or has access to their Google Play Console account for that app is the only one who can log into it and check to see if Google placed restrictions on it causing these notification problems.
Paragraph below is from Google Firebase page,
Supposed to affect newer android versions 7 or higher, seems to affect all versions, and could explain why notifications only works for some users.
"Background Restricted Apps (Android P or newer)
Starting Jan 2019, FCM will not deliver messages to apps which were put into background restriction by the user (such as via: Setting -> Apps and Notification -> [appname] -> Battery). Once your app is removed from background restriction, new messages to the app will be delivered as before. In order to prevent lost messages and other background restriction impacts, make sure to avoid bad behaviors listed by the
Android vitals effort.
https://developer.android.com/topic/performance/vitals/ These behaviors could lead to the Android device recommending to the user that your app be background restricted. Your app can check if it is background restricted using:
isBackgroundRestricted(). "
https://firebase.google.com/docs/cloud- ... id/receive
On that same page linked above it also says
"Override
onDeletedMessages"
In some situations, FCM may not deliver a message. This occurs when there are too many messages (>100) pending for your app on a particular device at the time it connects, another thing that could explain why notifications only works for some users. I may have gone over that limit?
The app developer or someone at Amcrest should log into the apps Google play console and check. Only they can clear it up if that's the case.
https://support.google.com/googleplay/a ... er/7385505
I see one item they flag, Excessive Mobile Network Usage in Background of over 50 MB in an hour which could put their app in restricted status. Not sure if this app when playing live view or playback of video is considered to be pulling it from the background or foreground. Easy to reduce data usage for playback and live view, to set NVR to record Extra Stream1 as well as main stream. Then app if set for Extra stream will retrieve Extra stream1 using far less bandwidth and better connection on slower network.
https://developer.android.com/topic/per ... usage.html
Phone we have with android ver 8 was not set to use battery in background however turning battery back on there for background use there did not solve the problem. Later Thursday afternoon it did get some push alerts except it could not play video link from alert since I had P2P turned off on NVR. At the time I enabled P2P on a single camera and my phone to see if push alerts would work from an individual camera but they would not, they came from NVR. Then I re-enabled P2P on NVR and the phone did not receive any more alerts after that. I could not replicate getting alerts going again, just a coincidence?
Older phone with Android ver 5.0.2 under battery settings shows a little bar graph of battery usage but does not tell if it is foreground or background usage. No setting that can be changed for battery usage other than stop or force stop but those two choices are greyd out for some reason. And I think I saw it a couple days earlier in battery settings it said battery usage 0 even though I had been using it on battery. But no way to re-enable it there if that is the problem. Older Android version also does not have any setting for app preferences. Some apps in app store claim solve that with an app wrapper to allow turning off preferences that you don't want on. However app wrapper apps not able to turn on preference you do want on. Have already tried removing and reinstalling app and setting phone back to defaults.
Also as far as the app working for some people, another thing I noticed that could effect that on the Firebase website is
onNewToken has to be called to create a new token if,
The registration token may change when:
The app deletes Instance ID
The app is restored on a new device
The user uninstalls/reinstall the app
The user clears app data.
https://firebase.google.com/docs/cloud- ... st-message
Firebase Cloud Messaging makes changes all the time like mentioned in their release notes.
https://firebase.google.com/support/rel ... es/android