Save game not work on Android sdk version 30

The fastest way to solve the issue is as follows:

In SaveGameSystem.h

	virtual FString GetSaveGamePath(const TCHAR* Name)
	{
		FString saveDir;
#ifdef USE_ANDROID_FILE
		extern FString GInternalFilePath;
		saveDir = FString::Printf(TEXT("%s/SaveGames/%s.sav"), *GInternalFilePath, Name);
#else
		saveDir = FString::Printf(TEXT("%sSaveGames/%s.sav"), *FPaths::ProjectSavedDir(), Name);
#endif

		UE_LOG(LogTemp, Warning, TEXT("Save game path: %s"), *saveDir);

		return saveDir;
	}

PS: This solution requires no write permission because GInternalFilePath is set with getFilesDir() function call in native side and then set in AndroidJNI.cpp GInternalFilePath = FJavaHelper::FStringFromParam(jenv, internalFilePath);
(Data and file storage overview  |  Android Developers)

4 Likes