• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android Editing GooglePlay APK extension. "READ_EXTERNAL_STORAGE" problem

Hi Gamemakers!
I would like to find out if I can edit the extension because it asks to READ_EXTERNAL_STORAGE and it affects my uninstall rate.
In the file it says that //It's our request!! so it looks like it is added by YOYOgames?
If it can be edited, it would mean the world to me and I wont have to nuke my app.

I can't attach text file for some reason, here is the snippet from extension
Code:
@Override
    public void onRequestPermissionsResult(int requestCode,String permissions[], int[] grantResults)
    {
      
        //Doesn't get called as when the result comes in the game hasn't yet evaluated extensions :(
        Log.i("yoyo", "RequestPermissionsResult received:"+ Integer.toString(requestCode));
        if(requestCode == MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE)
        {
            //It's our request!!
          
          
            for (int i = 0; i < permissions.length; i++)
            {
                String permission = permissions[i];
                int grantResult = grantResults[i];
              
                Log.i("yoyo","permission=" + permission + " result=" + Integer.toString(grantResult));
                if(permission.equals("android.permission.READ_EXTERNAL_STORAGE"))
                {
              
                    if(grantResult==0)
                    {
                        RunnerActivity.CurrentActivity.APKExpansionFileReady = true;
                    }
                    else
                    {
                        Toast toast = Toast.makeText(RunnerActivity.CurrentActivity,"Unable to run without storage permssions, please enable storage permission",Toast.LENGTH_LONG);
                        toast.show();
                        ActivityCompat.requestPermissions(RunnerActivity.CurrentActivity,new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},    MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
                    }
                }
            }
          
        }
      
    }
 
Last edited:
So yes, you can of course edit the extension however you like.

YYG believes that the extension requires "READ_EXTERNAL_STORAGE" permissions to function correctly, though, so it may not do what you expect without it.

Can you link to the extension you're talking about exactly? We'd have to look at the source to determine why it is asking for permission and if there is any way around it. I imagine there is not, but I'm happy to help you look.
 

FrostyCat

Redemption Seeker
This is an inevitable permission given the official documentation for APK expansion files:
For each app, there are never more than two expansion files in this directory. One is the main expansion file and the other is the patch expansion file (if necessary). Previous versions are overwritten when you update your app with new expansion files. Since Android 4.4 (API level 19), apps can read OBB expansion files without external storage permission. However, some implementations of Android 6.0 (API level 23) and later still require permission, so you will need to declare the READ_EXTERNAL_STORAGE permission in the app manifest and ask for permission at runtime as follows:
XML:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Given this information, you have to make a decision between turning off permission zealots or turning off people using those said implementations of Android 6.0+. "Win-win" is a nice ideology until the time comes to do business and make real choices.

If you plan to continue dealing with Google Play, either you make your games small enough to not need APK expansions (e.g. reducing scope, compressing music, single architecture per APK), or you accept the loss of permission zealots as a cost of business.
 
Thank you FrostyCat! I ended up doing just that - reducing the file size of the sprites, which brought the game size to 121mb...at the cost of the graphics quality. I figured that it's better to have more users rather than prettier graphics ( not an easy decision, haha!).
What bugs me still is I download other games from Playstore, 300, 400, 500+mb...and no requests to grant permissions at the start-up. I tried Dynamic asset delivery and of course that didn't work, app stopped. How come they are able to bypass the request from the official documentation?
 
Top