Member-only story
How To Access Data When Switching Mobile Frameworks
I updated my existing mobile app to Flutter. The biggest hurdle: how to keep existing users signed in automatically.
Back in 2017 I knew I was going to rebuild the RunPee app that I created ten years previously using Adobe AIR.
RunPee: the app that tells you the best time to run and pee during a movie without missing the best scenes. Free on iOS and Android.
I didn’t know which framework I would switch to, but knowing this day was coming I was able to lay the groundwork. The issue is that when a user starts the new app for the first time the app needs to know if this was an existing user, who was signed in already, or if it’s a totally new user who has never used the app before.
It would be great if the new Flutter app could simply locate the old device database files and continue as if nothing had changed. But I didn’t want to depend on being able to read data from an database created with a different framework. Sure, maybe they’re identical, but if not… Plus, it was time for a data refresh after 10 years.
What seemed to be the simplest and most reliable solution was to store the user ID number (unique user key) in a text file on the device. Now I only need to locate that file and read a number. With that I could get the users information from the server and recreate the databases. What could be simpler?