当系统弹出窗口显示Unity3D Samsung Gear VR蓝牙Android时,应用程序冻结 [英] Application froze when system popup show Unity3D Samsung Gear VR Bluetooth Android

查看:108
本文介绍了当系统弹出窗口显示Unity3D Samsung Gear VR蓝牙Android时,应用程序冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Unity3D为Samsung Gear VR和Samsung Galaxy S7开发一个Android应用程序.

I am developing an Android application using Unity3D for the Samsung Gear VR, with the Samsung Galaxy S7.

在我的应用程序中,我使用蓝牙在两个设备之间创建本地网络.当系统要求允许启用蓝牙发现功能的系统弹出窗口出现在我的应用程序中时,整个应用程序冻结,该弹出窗口没有显示,我必须重新启动手机才能再次使用它.

In my app, I use the bluetooth to create a local network between two devices. When the system popup asking permissions to enable bluetooth discoverability is supposed to appear in my app, the whole app freeze, the popup is not shown and I have to reboot the phone to use it again.

在我的应用启动之前,是否有解决方案可以请求该权限?例如,在我的应用程序的初始屏幕之前,又提出了另一个有关访问本地文件系统的请求,但是我不知道为什么以及现在如何请求此权限.

Is there a solution to maybe ask for that permission before my app is launch? For example, another request, regarding the access to local file system is asked before the splash screen of my app, but I don't know why and how this permission is asked at this time.

预先感谢

推荐答案

这是一个错误,现已在Unity 5.4.0B15中修复.

This is a bug that is now fixed in Unity 5.4.0B15.

Unity 5.4.0B15 Android棉花糖-修复了查询自定义权限时出现的问题.

Unity 5.4.0B15 Android Marshmallow - Fixed issues when querying for custom permissions.

更新为 5.4.0B15 即可解决此问题.

Update to 5.4.0B15 to fix this problem.

注意:

现在,在Android 6.0 Marshmallow中,系统会在运行时而不是安装时询问Android权限.您对此无能为力.

In Android 6.0 Marshmallow, Android permission is now asked when during run-time instead of install time. There is nothing you can do about that.

首次请求权限时,您会得到类似的信息

The first time permission is asked, you get something like this

第二次,玩家将有机会选择不再询问".

The second time, the player will have a chance to choose Never ask again.

这样做的原因是让用户完全控制要允许的权限和拒绝的权限.例如,当您不得不允许每个权限或拒绝所有权限时,可以像以前那样允许WiFi但拒绝Bluetooth.

The reason for this is to give the user complete control of which permission to allow and which ones to decline. For example, you can allow WiFi but reject Bluetooth unlike before, when you had to either allow every permission or reject all of them.

这篇关于当系统弹出窗口显示Unity3D Samsung Gear VR蓝牙Android时,应用程序冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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