4 ms·
Heh I have been writing Android apps for a long time and versioning has very rarely been a hard problem. The support lib makes sure that you have a unified API
by on_and_off 9y ago
Heh
I have been writing Android apps for a long time and versioning has very rarely been a hard problem.
The support lib makes sure that you have a unified API in front of you.
It can be a big bother for some very specific apps like a camera (I have never written one though, I can only say that camera 1 vs 2 looks painful from afar).
Most of the time you just access the APIs from the support lib facade and either :
-the support lib (re)implement for you.
-it fallbacks gracefully if something minor can't be backported
- rahkiin 9y agoBut if you wanted to use Java 8, which has been available since 2014, on Android you need to target at least Android 7.0, skipping out on 4.4-6 which is a huge market. On iOS however, you can use Swift on many more devices, even the latest version of Swift.
- Bilal_io 9y agoDon't forget that many apps from the ios app store stop working for old os and force you to either upgrade your os or you can't use the app. I remember that back in ios 4 and 5 when Skype doesn't work and forces you to upgrade. Not sure if that's how many devs are or it was only Skype.
- colejohnson66 9y agoThe difference with Android being that you can’t always update your OS. iOS 10 was supported on everything back to iPhone 5. That means iPhones 5, 5c, 5s, 6, 6s, SE, and 7. iPhone 5 was released back in September 2012; That’s literally 5 years ago.
- Pulcinella 9y agoI believe now the iOS App Store lets you download the latest version of the app that will still work on your phone (though I suppose for a service like Skype that still may not be helpful if the service provider cuts off access to older apps).
- dahauns 9y agoTrue to an extent - parts of J8 are available with lower API levels as well. But then there's Kotlin, which doesn't have these restrictions.
- dep_b 9y agoAnybody still starting new Android projects in Java has a pointy hairstyle or stopped having fun in programming a decade ago. I bet somebody will use the word "maturity" to scare people into not choosing Kotlin but it's really just a dev that slowly grew scared of learning new things.
- dep_b 9y agoFour downvotes yet no counterarguments. Because there are no arguments to use Java over Kotlin. Yet it hurts to read it for some?
- MBCook 9y agoHow about because all you did was insult people who aren’t using your pet language? I use Java 8 (not an Android developer). I think it’s a great language and I’m very familiar with it. I imagine it’s the same with many others. Your post is basically the same as “LOL old-timer C++ people, if they’d just use Rust things would be fine”. It’s not useful or constructive.
- dep_b 9y agoYou see Kotlin is a drop-in replacement for Java. Just like VB.Net is a drop-in replacement for C# and vice versa. There is no scenario in the .Net world thinkable that cannot be solved with VB.Net. Yet nobody uses it, while there were droves of people that were very comfortable with VB long before C# even existed. C# was on equal footing a better language than VB.Net and people started using that. Nobody can deny C# is just more productive. Even when the real differences between VB.Net and C# are much smaller than it seems. You as a Java developer must understand why a Java-like language like C# would be superior to a BASIC-derived language unless there were other factors in play. Kotlin is proven better than Java, not forcing people to deal with nil all the time leads to safer and more terse code when used by an equally skilled programmer versus Java. It's the exact same position as VB.Net vs C#. And major vendors are backing it, just like C# got official support from Microsoft. I can't judge C++ versus Rust. But Rust is not a drop-in replacement for C++ at all for what I understand about it.
- on_and_off 9y agoYou can use Kotlin on Android, which is way closer to Swift than Java 8. There has been no clamor for Java 8 in the Android community. It is a fine update to Java 7 but Kotlin offers us so much more. So we asked for Kotlin and that's what we got.
- jbob2000 9y agoI don't understand how you can say that versioning isn't a hard problem when you've been developing for a long time. Every major release brings a host of changes, and every release, you have to litter your codebase with "if version > x do this else do this". There is utter chaos for the first few days while the development community not only orients around the OS changes, but also how every phone manufacturer has bungled the changes (Samsung, being the worst at this).
- EddieRingle 9y ago> Every major release brings a host of changes, and every release, you have to litter your codebase with "if version > x do this else do this". I rarely, if ever, have needed to do this, and I've been working with Android since 2009. Most of the time that is abstracted away by the support libraries, anyway. The version fragmentation generally isn't a huge issue for Android app developers, in practice.
- on_and_off 9y agoSame thing here. Yeah there are some `if (SDK_INT > x)` but I can't really say that the code is littered by those. I can spend weeks (maybe months) without having to make such a check. We also have some OEMs specifc bugs that need addressing from time to time. Again, this is very annoying but not a 'significant' part of the effort.