Android SDK33 update causes previous version saves to be lost.

Here is our scenario:

We have a game out on GPlay. Perhaps unfortunately we set it up to use all these permissions, as we were not clear on how things worked.

READ_INTERNAL_STORAGE

READ_EXTERNAL_STORAGE

WRITE_INTERNAL_STORAGE

WRITE_EXTERNAL_STORAGE

In addition we have UseExternalFilesDir checked.

Now, we updated to SDK33, and added a UPL as seems to be best practice. This did not help, and due to failure to test properly, we now have thousands of users who lost their save files : (

Any advice on what the proper procedure is to update to SDK33 and retain old storage saves?

    <?xml version="1.0" encoding="utf-8"?>
    <root xmlns:android="http://schemas.android.com/apk/res/android">
       <androidManifestUpdates>
          <removePermission android:name="android.permission.READ_EXTERNAL_STORAGE" />
          <addPermission
             android:name="android.permission.READ_EXTERNAL_STORAGE"
             android:maxSdkVersion="32" />
       </androidManifestUpdates>
    </root>
1 Like

Were you able to resolve this?

Well, we use a UPL file to fiddle with the permissions. But we did not manage a clean upgrade at the time, and users lost save data, which was a big pain.

<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
	<androidManifestUpdates>
		<removePermission android:name="android.permission.READ_EXTERNAL_STORAGE" />
		<removePermission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
		<addPermission
			android:name="android.permission.READ_EXTERNAL_STORAGE"
			android:maxSdkVersion="32" />
		<addPermission
			android:name="android.permission.WRITE_EXTERNAL_STORAGE"
			android:maxSdkVersion="32" />
	</androidManifestUpdates>
</root>