Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
Of course, an OEM may do aggressive app killing where the above may not work (Huawei is notorious for this), but that is an OEM-specific issue that applies to all apps in general, so as a developer it’s up to you whether you want to test against, or even support such OEMs.
There are alternatives. Pushy is pretty easy to use, and it’s not that hard to allow it to run in the background. See: https://support.pushy.me/hc/en-us/articles/360043423332-How-can-I-send-notifications-to-Android-devices-in-Doze-power-saving-mode-
Of course, an OEM may do aggressive app killing where the above may not work (Huawei is notorious for this), but that is an OEM-specific issue that applies to all apps in general, so as a developer it’s up to you whether you want to test against, or even support such OEMs.