Whatsapp has officially revoked support, Google says 0.2% of devices accessing Google Play are still running it. I explore the difficulty in targeting a 10-year old version of Android.
Step 1: Search the internet
Maybe I’m using the wrong search terms but this is a bit of a bust. Google likes to showcase new shiny things. My search did come up with the above information regarding Whatsapp and also Google removing support (if you want to target the Play Store) but how do I do this for just my phone?
Step 2: Just go for it
I am using Android Studio. What if I just choose Gingerbread in the settings from a new project? Will it work?
Ok, it turns out that I only have lowest Android 4.0 (Ice Cream Sandwich)
I need 2.3.3 (Gingerbread)
Let’s check the SDK settings in Android Studio – I am sure I installed all the correct target libraries years ago, what is the problem?
SDK tools says Gingerbread is installed. Google says no!
Step 3: What happens if I plug the phone in?
Android Studio and ADB recognise the device. API level is 10. OK in my new project I go to build.gradle (why are there two, couldn’t they just call the one you need to edit something else?) and change API level to 10 (target, min, compile) – now what? Wait some hours while Gradle does it’s magic. I’m waiting for my laptop to be depreciated by Android Studio to be honest, it’s such a resource hog! (pro tip, if your laptop is running too hot, check out cpulimit on the command line. Or just get a job and buy a new one..)
This is turning out almost as bad as React Native, which I had a look at the other night – 1 hour to get to a “Hello World” app to work. Admittedly I was installing the framework from scratch…
So far so good, Gradle hasn’t thrown any errors, I’m installing the basic Gingerbread app now…
Oh snap! ConstraintLayout not supported on Gingerbread. Do I want to override this warning and install anyway (or use another layout, what did people use for Gingerbread back then?
Install anyway Gradle lets find out if I can get this thing to run. I love ConstraintLayout, most of my apps use it!
Ok nah, Android support v7 library has moved past the whole “Gingerbread” thing (AKA they DEPRECIATED it). Time to start again – I may need a new test project..
Support v4 library has minimum API 14, same as Support v7 library.
So far no luck compiling anything for my old phone with Android Studio.
Let’s Try Github
There’s loads of old code on Github, clone and install something from +5 years ago when Gingerbread was still supported?
OK success. I went and imported a project (https://github.com/andmatand/knitknit-gingerbread/) 44 commits, somebody put some time into this knitting tool for their girlfriend (it says so on the readme)
Then I had to specifically choose not to use the latest versions of libraries, add maven (all guided by Android Studio) and voilla. The thing installs.
This is pretty hit/miss. But as a proof of concept I will take it. I want to use my old phone for something, maybe as a streaming webcam, we used to use it as a baby monitor when my son was little. Now I can make my own apps for it.
Next up: Installing Ubuntu on my S3 mini (using PostmarketOS) and running some good old c – and is there any point in doing this if you can just install Termux?
Hi Professor, I have an HTC flyer which I think is a quality device but as you may know it is not updatable to even android 4.4.I really just need a camera app to run on it. Could you make the follow app compatible for ginger bread?
https://m.apkpure.com/tosee/com.tocoding.tosee
Hi, as mentioned in the blog post, I didn’t have any success installing recent apps on my device. Only the oldest apps worked, your best bet is to look around and find something that is Gingerbread compatible. I found one you could try on F-Droid: https://f-droid.org/en/packages/com.lightbox.android.camera/
Hi! I have a Samsung I5500 with Cyanogen which provided Gingerbread. Like you, i was searching for Android Studio of some years ago but the oldest available do not supports this Android API.