x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Save Game not working when APK downloaded from Google Play

For some reason my Android Cardboard VR game does not save when I've uploaded it on Google Play. It works fine in editor and it also works fine when I install it via the .bat script in the packaged folder, but it does not save when it's on Google Play. I've seen similar questions but none of them helped. I'm packaging to Shipping mode in a blueprints only project.

Product Version: UE 4.15
Tags:
more ▼

asked Apr 25 '17 at 09:13 AM in Packaging & Deployment

avatar image

Increditastic
6 1 2 5

avatar image Rudy Q ♦♦ STAFF Apr 25 '17 at 03:43 PM

Hello Increditastic,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?

  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?

  3. Could you provide screen shots of any settings/blueprints that may be involved with this issue?

avatar image Increditastic Apr 27 '17 at 08:47 AM
  1. I haven't tried, because I'd have to upload to Google Play.

  2. I also haven't tried. If I need to I'll try and produce the issue in a clean project.

  3. These are my save and load BP:

alt text Load BP

alt text Save BP

load.png (223.1 kB)
save.png (247.3 kB)
avatar image Rudy Q ♦♦ STAFF May 04 '17 at 08:02 PM

Thank you for the additional information. Where you able to reproduce this issue in a clean project?

avatar image Vaheva Apr 25 '17 at 04:07 PM

Do you have your app permissions declared? When someone install your app, is question about permission - save on device or something like this? I not have app in UE4 but I created few in android sdk, same rules.

avatar image Increditastic Apr 26 '17 at 08:33 AM

Yes. I just checked Android documentation and it says I do not need permission to save on internal storage. For external storage, UE4 automatically declares the permissions.

avatar image Rudy Q ♦♦ STAFF May 17 '17 at 05:06 PM

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Thanks,

avatar image Adwait khot Dec 02 '17 at 06:56 AM

I am having the same issue save game works if i install the app as .bat file but if i copy and paste apk and data in the obb folder or download the app directly from play store then the save game does not work. alt text

savecoins.png (100.5 kB)
avatar image Unzkilled Dec 02 '17 at 10:46 AM

I heard somebody saying something like this happen because of the client can not create the directory.

avatar image Adwait khot Dec 12 '17 at 12:52 AM

I'm really worried. Despite of trying to reach Epic games and unreal support staff repeatedly. There has been no communication to the mail's I've sent . No one bother's to respond in any way . Which brings my concern that i won't be able to publish my game since publishing it requires working save game data. If someone is reading this and has a better(faster) way to reach Epic games staff please let me know. Case #1445902 .

avatar image feiwu Jan 03 '18 at 01:30 AM

I have similar problem, but at last, I save it by myself, I save the file under: FString savePath = FString::Printf(TEXT("%sSaveGames/%s.txt"), *FPaths::ProjectPersistentDownloadDir(), Name);

and custom serialize saveobject to this file, it works.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

If you are facing the following issue then : Fix Step 1. Go to Project Settings

Step 2. Enable the checkbox " Use ExternalFilesDir for UE4Game files ?

more ▼

answered Dec 18 '17 at 02:36 PM

avatar image

Adwait khot
41 7 2

avatar image Victor Matos Mar 14 '18 at 07:55 PM

This totally worked for me!

Thank you so much Adwait!

avatar image KillerSneak Apr 15 '18 at 05:47 PM

Wouldn't this delete the savegame/data once a player uninstalls the app?

avatar image KillerSneak Apr 15 '18 at 06:26 PM

This does seem to fix the problem with a Android Shipping build.

avatar image NonPolynomialTim Jun 18 '18 at 09:54 AM

Confirmed again that this solution fixes save game data in Android Shipping builds. Thank you!

avatar image darinsmyth Jul 06 '18 at 06:30 PM

Another one who had to use this on a S8 to get a save game working on shipping build, thanks :)

avatar image Elvince Jan 14 '19 at 03:53 PM

Why do we need to check this to allow the save game to be written on the app storage? I mean this box is to write on SD card not internal memory. Thanks for the clarification.

avatar image Elvince May 20 '19 at 07:53 AM

So you know, I had a discussion with the Support team on this topic and they confirm this is the proper way to do it. This has been confirmed by the developper also. The sentence used is not good and lead to a misunderstanding, they know it. But it seems that ExternalFilesDir is not the SD card, but the application folder. They told me it is the way android called dir outside of the core system. I hope this will help to clarify that.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Actually, Use ExternalFilesDir for UE4Game files is not the best, and possibly dangerous idea. The point is that save game generated this way will always be deleted when user uninstalls the app. But update on Google Play, as far as I know, does exectly this - uninstalls and then installs the app again, so each time you update the app users lose all progress.

I managed to make save game work without ExternalFilesDir for UE4Game files enabled, but for this I have to permit write for my app manually via Android settings. The problem is that you need to warn user that in order to make saves he has to make such manual permission himself. Also not the best idea.

more ▼

answered Aug 16 '18 at 12:08 PM

avatar image

RedSpotSylphina
47 4 5 9

avatar image Cervelx May 15 '19 at 02:32 PM

Hi, i have the same issue with the shipping build, can you explain me better how to get the android permission ? I want to fix that without " Use ExternalFilesDir for UE4Game files"...

avatar image RedSpotSylphina May 16 '19 at 02:39 PM

Hello :)

Here are screenshots from my project:

Check if permission is already granted: alt text

Then ask for permission if not granted (do nothing if granted): alt text

Re-check permission after it was granted. If permission was granted - create widget with restart prompt. If permission was not granted - create widget with explanation that user cannot run the appication without the permission: alt text

During restart prompt user will have to restart application manually. I know no ways to make such restart automatic with blueprints.

avatar image Damo_108 May 30 '19 at 09:11 PM

Hey man, Great work, I have the same problem, I can turn on Storage Permission Manually and it works (THANK GOD). But your blueprint looks really interesting, I'm trying to recreate it but I'm having issues. Are you coding this in a Game Instance, Game Mode Or Level Blueprint? Also How do you get that Input node???

avatar image RedSpotSylphina May 31 '19 at 10:03 AM

Hi! Thanks :)

I prefer not to use level blueprint or game mode blueprint for scripting (with some small exceptions). You see input node because this is macro. I make some script parts in macros to make the main script more comfortable to read and modify - the entire macro looks like a single node in the main script. And this macro just belongs to one of blueprint classes.

avatar image Cervelx May 16 '19 at 03:04 PM

Wow! Thanks man ! I really appreciate your help ! I'm going to try.

avatar image RedSpotSylphina May 17 '19 at 02:31 PM

You are welcome :)

avatar image Cervelx 5 days ago

Hi. I want to thank you. Everything worked out great. I want to ask you a question, in the image c after the "check android permission" you created a widget to restart the game, well, this thing in my project does not want to work, after clicking accept permission the game stops and I can not do other actions, of course if then restart remains the permission and the game works perfectly. But the first start is problematic for the player. Do you know what it could be? Thank you.

No problem :)

My "restart game widget" is just a text message notifying user that he has to restart application manually in order to continue. I didn't find any solution that would be any better, at list for 100% blueprint based project.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I'm having the same issue.

  • Local testing works fine (from PC)

  • Testing it by installing the APK with the BATCH file works fine

  • installing from the app store and save games don't work at all

Any news on this?

more ▼

answered Apr 15 '18 at 05:38 PM

avatar image

KillerSneak
151 10 12 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question