Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Preserving user data while app updates?

Author
Message
Arch-Ok
AGK Developer
5
Years of Service
User Offline
Joined: 11th Jul 2019
Location: Bursa/TÜRKIYE
Posted: 10th Oct 2019 17:46
Shortly, I need a folder like whatsapp e.t.c. creates on my phone because I'm afraid if I release a newer version of my game, old data will be lost on the users devices. AGK's Read and write folders won't be sufficient I guess? I need an'outfolder' (sorry, I'm really new to mobile)



How can I preserve the user data and game progress if my app needs to be upgraded by the client side?

My data file is in the media folder and if the already installed game updates (from google play etc) I assume that the data file will be lost/overwritten. So I decided to;

1 - when app starts, it checks if the outfolder contains the data file. If not, then app copies the data file from the media file and it assumes that the app is just installed. And the app won't do any other thing to the data file in the media folder. (maybe a backup strategy by using both files? later...)
2 - every change on the data will be written to the data file which is in the outfolder.

and here are my questions;

how can I create a folder like whatsapp creates to my phone's root? I need a folder which is not in the install package.
and what happens if I don't add data file to newer app versions? Does the data file on the clients phone remains or will be deleted anyways?
Arch-Ok
AGK Developer
5
Years of Service
User Offline
Joined: 11th Jul 2019
Location: Bursa/TÜRKIYE
Posted: 10th Oct 2019 21:23
I have uploaded my apk to my phone and installed the app. Then I played with it and progressed in the game and the data was saved to the file in the media folder. Then I just deleted data file in the media folder on my Windows PC and exported the new apk without that file. Then I uploaded new app to my phone and updated (re-installed) it. And the data file was there the progress was there on my phone .

It is a pain in the **s to try 'upload re-install the app' so I've opened a thread if there was a quick way, so, if I update my app's version in the future, while releasing it, I will release it without the user data file and the data will be preserved at least on android.
RGBZ
7
Years of Service
User Offline
Joined: 19th Apr 2017
Location:
Posted: 14th Oct 2019 19:11
I use Playfab.com to track users logged into the game and store user data. I write to the folder to store the last user data elements to make start up quicker, but getting the user data from Playfab is my source of data. So when upgrading I won't loose the players data.

Login to post a reply

Server time is: 2024-11-22 16:54:40
Your offset time is: 2024-11-22 16:54:40