gpt4 book ai didi

android - Toasts 在 4.4.2 中停止工作

转载 作者:行者123 更新时间:2023-11-29 00:17:38 27 4
gpt4 key购买 nike

在我的 RazrM 手机升级到 4.4.2 之前,Toasts 在我的应用程序中运行良好。然后他们停了下来。我专门尝试过 runInUiThread 并移动调用以从代码中的不同位置启动,包括 onCreate()。问题 [20373751] ( Toast not appearing on Android 4.4 KitKat ) 建议重新启动或专门在 UI 线程上运行。两者都没有区别。

该问题还质疑 Nexus 或 KitKat 是否存在错误。我的 Toasts 在 Samsung Galaxy Tab 上的 4.0.4 中运行良好。所以我认为问题出在 4.4 中。有没有人找到解决方法? (顺便说一句,我正在编译版本 9 的目标,所以这不是编译级别的问题。但我使用的是臭名昭著的 23.0.2 SDK。)任何人都可以证明 Toasts 在使用 SDK 23.0 时在 4.4.2 下工作。 2?

最佳答案

在 [21098062] @marcin_j 中说:

On Jelly Bean 4.1 or higher,you can disable apps notifications from device settings. Just open notification bar, long tap on any of notifications and click App Info, you should see “Show notifications”. Unchecking this option should disable toasts in your app.

If your app does not show any notifications, then you should be able to reach App Info screen from applications manager.

Maybe this is the cause of you missing toasts


这是绝对正确的。我的 4.0.4 设备没有受到影响,但我的 4.4.2 设备未选中“显示通知”。

关于android - Toasts 在 4.4.2 中停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25507416/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com