Home Artists Posts Import Register

Content

tl;dr If you are on Android, activate the External Save Option in the Options menu BEFORE upgrading to prerelease-1/major release!

If you are playing on Android and don't want to lose your saves, please read this!

Over the past month, I had been fighting with the external saves feature and made some bad discoveries regarding the app container framework I have been using. Those who read discord or the devlog posts maybe already read about this. 

In the course of the development work last month, I tried to upgrade the framework to newer versions and it appears that doing so makes the internal saves unrecognizeable by the app - for whatever magical reason I cannot perceive. Downgrading the framework made the saves "reappear" so clearly they don't get lost in the upgrade process and are there, but somehow the library RPGMaker is using to query this data is not finding it. Not sure if it's some compatibility issue or something else. In either case, this means that supporting newer Android versions is not possible on the current framework.

In addition to that, the framework (cordova) we are using got "abandoned" by the foundation it was a part of. It's still an open source framework that has some maintainers so I thought it would be fine, but Android has been making radical API changes over the years that no couple of maintainers can keep up with. In particular in regards to managing access rights for apps. There is technically a solution by some open source contributor that should expose the new and correct way for accessing files on Android, but it's literally just "some guy" and I couldn't get it to work. Needless to say, there isn't exactly a lot of support for the contribution of some random guy. And the big and important thing here is: If you do not use the new way of accessing files, apps cannot access files they did not create themselves. This means, if you use the external save feature currently, you can export your saves, and for example, transfer them to PC but you cannot transfer them from PC to phone or old phone to new phone.

So all these troubles lead me to the decision of completely changing the approach we have been using for the android port. Instead of using a framework, I created a fresh Android app and used the WebView approach, re-implementing the features we used from the framework for our port... It's not exactly like we needed exactly a lot of features, so outside of my complete lack of expertise on this matter, it wasn't actually all that much work.

---------------------------------------------------------------------------------------------------------

So much for the backstory, the catch is: This switch, just like upgrading the previous framework, will "lose" the internal saves. I tried my best to figure out a way to query them, but couldn't get anything going, so I figure it's time to put the time investment to a hold and just do  it this way. There are probably a lot of people not going to read this... 

Anyways, what does work in the new approach, is importing saves that were not created by the app!

That means, if you take your current game, use the External Save feature and THEN upgrade, and then finally on the upgraded version ALSO turn on the External Save feature , you can retain your saves. 

Note that in the new approach, when you activate the External Save option, you will also have to select a folder. This is because the way access rights for files is handled through this new dialogue through Android. On the other hand, you no longer need to give blanked permissions for file access when you first start the app as this is now handled through this above mentioned file dialogue.

The upside here is that your saves don't have to be in Documents/AuraGamedev/Star Knightess Aura/save but can instead be anywhere you want, including some cloud storage like dropbox or gdrive for extra backup.

I hope this will be the last time we have issues with Android saves  (obviously it's not -__-). I wish there was an automatic way to do this, like the migration scripts that I use to migrate incompatible save data, but sadly I can't integrate a custom migration process into the app upgrade. 

Also I expect a bunch of issues - the implementation ended up pretty straight-forward but because I have been squeezing in the devtime for this at evenings and nights, the, um, error handling is not particularly mature... And I already know that all of you will come up with unexpected setups that will break everything. :''''''D

Alright, see you all for the prerelease tomorrow.

Comments

No comments found for this post.