Someone please pulled me out of my workspace and told me to go touch some grass 🤯
This devlog will have a bit of a “technical” touch. First, we need to mention the reason we have this devlog, which is a recent GitHub issue. Its content suggests that my program should support older Android versions (possibly around Android 6).
At that time, my app only allowed installation on devices running Android 7+. When I came up with the idea, I also targeted Android 7+ because the BLE functions work well from this version. But coincidentally, I have a tablet at home running Android 5. A fleeting thot crossed my mind, and I decided to make the BTChess app compatible down to Android 5!! A move that I don’t know if it’s genius or a mistake anymore.
The first thing I have to do is reinstall the Flutter SDK. The Flutter SDK I was using at that time supported minSdkVersion=24. That means the app built will only run on Android with API 24+ (that is, Android 7+). At first, I tried to lower it manually in the configuration files, but that didn’t seem to solve the problem, so I had to find and install an older version of the Flutter SDK. Then, I had to review all the project dependencies, check which ones do not support the current SDK version, and downgrade their versions. After that, I was able to build the app for Android 5+, but another issue arose. There is a slight difference in how the app “requests” Bluetooth permissions, and it took me an extremely long time to fix it so that it could work.
I think it’s time to discuss the trade-offs. The benefits of this modification include the ability for BTChess to support Android 5+ instead of just Android 7+ (BTChess can be used on an Android tablet over 10 years old!). The “smoothness” of the app and the stability of the BLE gameplay mode were compromised as a result of having to downgrade several dependencies. I’ll make an effort to enhance and optimize these shortcomings.
So, do you think this modification is worthwhile 🤔