屏幕旋转后蓝牙激活警报对话框乘法 [英] Bluetooth activation Alert dialog multiplication after screen rotation

查看:96
本文介绍了屏幕旋转后蓝牙激活警报对话框乘法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也遇到了奇怪的问题。从活动在onStart()我通过意向请蓝牙激活和120秒可发现:

I have encountered strange issue. From Activity onStart() I request Bluetooth activation and 120s discoverability via intent:

Intent activateBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
startActivityForResult(activateBTIntent, BT_ACTIVATE_INTENT);                                   

我用它,如果没有蓝牙已经被激活与否的问题。 Android文档说,蓝牙会,如果不是,启动和正常工作。在这两种情况下,我得到系统警报对话框

I use it no matter if the Bluetooth is already activated or not. Android documentation says that Bluetooth will be activated if it was not, and that works fine. In both cases I get system Alert dialog

当我旋转笔者观察闪烁的屏幕。上是/否preSS删除一个对话框,但仍有低于另一个。执行屏幕旋转,我可以得到一堆警告对话框,并有preSS是/否每个摆脱他们。

When I rotate the screen I observe flickering. Press on Yes/No removes one dialog, but there is still another one below. Performing screen rotation I can get a pile of Alert dialogs, and have to press Yes/No on each to get rid of them.

描述的问题是只有当意图发送蓝牙是不是已经开始present,否则它工作正常。尝试在不同的2.2手机,而问题是所有present。在我看来就像Android系统的问题。

Described issue is present only if Bluetooth was not already started when intent was sent, otherwise it works correctly. Tried on different 2.2 phones, and issue is present on all. Looks to me like Android system issue.

有没有人遇到过也,也许有一些有用的提示如何避免这种情况?

Has anybody encountered it also, and maybe have some useful hint how to avoid this?

感谢和问候。

推荐答案

这是导致此设置应用程序中的错误。该RequestPermissionActivity是在复制其旋转的RequestPermissionHelperActivity实例。

This is a bug in the Settings app that causes this. The RequestPermissionActivity is duplicating its instance of RequestPermissionHelperActivity on rotations.

这篇关于屏幕旋转后蓝牙激活警报对话框乘法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆