- Home /
OBB storage permission dialog not showing up on android v8.0, google beta testing
Hello everyone,
I have been dealing with this obb issue for over a week now getting quite depressive :(
All info: I am beta testing my game, with an LG G5 v8.0, since I am uploading the game on google play, I have no choice but to upload the game as a split binary, with the apk and the obb file individually, since the apk is biggger than the 150mb apk limit of google, but doing it this way require to ask the permission of the user in order to access the obb in the storage, but unfortunately it is not working for me.
I have followed and tried all the solution on the forum for this issue: https://forum.unity.com/threads/apk-with-expansion-file-obb-fails-to-load-the-second-scene-until-the-phone-has-been-restarted.465714/page-2
I have added the line:
"meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true"/" "uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /"
"uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /"
in my android manifest and have tried @DaReign solution, it got me until the ask for permission and once I press the accept button, which is suppose to trigger the android dialog to get pop up(the allow/deny UI), nothing happen, the accept button call for the OnGrantButtonPress().
Image of my UI:
Here are all my line of codes: Code (CSharp):
[code=CSharp]
//UI to access android dialogue permission
public GameObject requestpermission;
//UI to acess button to load the next scene
public GameObject loadnextscene;
private const string STORAGE_PERMISSION = "android.permission.READ_EXTERNAL_STORAGE";
void Start () {
requestpermission.SetActive (false);
loadnextscene.SetActive (false);
CheckPermissions();
}
//load next scene
public void shownextscene(){
SceneManager.LoadScene ("start page normal");
}
//close application if user refuse access
public void hideaccess(){
Application.Quit();
}
private bool MyCheckPermissions(){
if (Application.platform != RuntimePlatform.Android){
return true;
}
return AndroidPermissionsManager.IsPermissionGranted(STORAGE_PERMISSION);
}
public void CheckPermissions(){
if (!MyCheckPermissions ()) {
requestpermission.SetActive (true); //pop UI with accept or refuse button
}
}
//if user press accept button, this method get called
public void OnGrantButtonPress()
{
AndroidPermissionsManager.RequestPermission(new []{STORAGE_PERMISSION}, new
AndroidPermissionCallback(
grantedPermission =>
{
// The permission was successfully granted, restart the change avatar routine
requestpermission.SetActive (false); //close UI
loadnextscene.SetActive (true); //pop button
},
deniedPermission =>
{
// The permission was denied
hideaccess();
},
deniedPermissionAndDontAskAgain =>
{
//honestly dont care about this at this point
// The permission was denied, and the user has selected "Don't ask again"
}));
}
}
} [/code]
Also restarting the device make no difference.
The device I am testing on is LG G5 version 8.0 with Unity 2017.1.1.f1 It seem like I cant reach the Obb file no matter what I do.
Any help would be greatly appreciated :).
Thank you
-Phoenixrider