Push Notifications don't work on Xiaomi device

Hey!

  1. SDK Version: 38
  2. Platform: Android

I’m developing a mobile Android application using the Expo SDK version 38, and one of it’s features is a push notification service, for which we use Firebase. I managed to send push notifications succesfully to a Amazon Fire tablet using both the Push Notifications Tool and our own server, but when I tried to do the same with a Xiaomi Redmi 5A it didn’t work, and gave me the following error:

java.lang.RuntimeException: Unable to instantiate receiver abi38_0_0.expo.modules.notifications.notifications.service.ScheduledAlarmReceiver: java.lang.ClassNotFoundException: Didn’t find class “abi38_0_0.expo.modules.notifications.notifications.service.ScheduledAlarmReceiver” on path: DexPathList[[zip file “/data/app/host.exp.exponent-OSWwlMh3cCofuZyv0se4FQ==/base.apk”],nativeLibraryDirectories=[/data/app/host.exp.exponent-OSWwlMh3cCofuZyv0se4FQ==/lib/arm64, /data/app/host.exp.exponent-OSWwlMh3cCofuZyv0se4FQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3210)
at android.app.ActivityThread.-wrap17(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1701)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6651)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “abi38_0_0.expo.modules.notifications.notifications.service.ScheduledAlarmReceiver” on path: DexPathList[[zip file “/data/app/host.exp.exponent-OSWwlMh3cCofuZyv0se4FQ==/base.apk”],nativeLibraryDirectories=[/data/app/host.exp.exponent-OSWwlMh3cCofuZyv0se4FQ==/lib/arm64, /data/app/host.exp.exponent-OSWwlMh3cCofuZyv0se4FQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3205)
… 8 more

I already disabled battery savings for Expo, and also tried to generate an APK and install it on Redmi 5A but it didn’t install.

Could it be something related to the device or the Xiaomi ROM themselves?

Thanks in advance!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.