- Home /
[Crash] Unity with GearVR can crash after allowing permissions after first installation
Hi,
I've got a crash on my game after allowing permissions after the first installation. I have no idea how I can avoid this.
Logs (end) : http://pastebin.com/AW9qpVsk
android.view.WindowLeaked: Activity com.samsung.android.hmt.vrsystem.permission.PermissionActivity has leaked window com.android.internal.policy.PhoneWindow$DecorView{e3461c3 V.E...... R.....ID 0,0-1280,960} that was originally added here
Had anyone got this problem before? (I understand the actual issue, but since it's Unity' side.. http://stackoverflow.com/questions/2850573/activity-has-leaked-window-that-was-originally-added)
When I build only one scene (on 3), it works just fine.. but that's not a solution.
Thanks in advance, Sylafrs
Edit: Strange, it happens on my samsung s6 but not on the s6 of my friend. I guess my phone has an issue..
Answer by Sylafrs · Sep 26, 2016 at 12:42 PM
Okay, my solution was to set the targetSdkVersion below 23. (so between 19 and 22 included). I set it to 19.
With this target, the permissions aren't asked at runtime but it's asked during setup, so the permission activity doesn't start and can't crash.