There is a problem receiving Push notifications on Android MIUI (Xiaomi note 4X) when the application is not running. I found the information that I need to add the following code to AndroidManifest.xml:
<receiver
android:name="myPackage.BootReceiver"
android:enabled="true"
android:exported="true"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
This code runs the process in the background to receive Push notifications when the main application does not work. Which class is required instead of “myPackage.BootReceiver”? Or maybe there is another solution to the problem.