Application froze when system popup show Unity3D Samsung Gear VR Bluetooth Android

与世无争的帅哥 提交于 2019-12-25 07:28:04

问题


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.

Thanks in advance,


回答1:


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

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

Update to 5.4.0B15 to fix this problem.

Notice:

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.

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.



来源:https://stackoverflow.com/questions/36773974/application-froze-when-system-popup-show-unity3d-samsung-gear-vr-bluetooth-andro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!