繁体   English   中英

通知显示在 android 仿真器中,但不在物理设备上

[英]Notification shows up in android emulator but not on physical device

I have set a timely notification of 30 minutes using JobScheduler, my app shows the notification in Android Emulator(Pixel 3 API 29 Q-10) after 30 minutes but not on my physical device(Samsung S8 Android 9 Pie). 奇怪的是,当我在 30 分钟后打开应用程序时会显示相同的通知。 android有什么限制吗?

到目前为止我已经尝试过:

  • 使用 USB 调试器模式在物理设备中运行应用程序,没有错误。
  • 单独构建 APK 并将其安装在设备中

我发现,如果手机处于节电模式或任何电池优化模式,通知将不会显示。 关闭省电模式对我有用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM