OK.
So I was going to talk a bit about Compatibility, and how Google have made the Material Design
concepts available in earlier versions of Android, even though they didn't introduce Material Design until
Lollipop.
So Google made some pretty radical design changes when they released Android Lollipop, but they also
spent an enormous amount of time trying to ensure that the functionality also works in previous Android
versions. Now maintaining Compatibility with old versions is an issue with any operating system, be it
Android,
IOS, or Windows, for example.
In fact, throughout 2016,
Microsoft went to a lot of trouble to persuade people to upgrade from Windows 7 and 8 to Windows 10.
So it was better for Microsoft to offer a free upgrade, than to continue supporting millions of computers
running the older versions.
Now Microsoft Windows is one example of an operating system where they went to great pains to make
sure that an app that was working in, say, Windows XP, would work in Windows 2000, for example.
They even added a Compatibility Mode in several versions of Windows, so that older programs would continue
to work.
So in other words, they made sure that the current edition didn't alienate all these old applications that
worked on previous versions of Windows.
So now Android is much the same.
Now it's not fully automatic, but with only a little bit of work, you really can have your cake and eat
it too.
So in other words you can create an app that takes advantage of the functionality, and the great new
features, in Android Oreo, but still have those applications working in previous versions of Android.
Now there's some work involved in this.
So it's certainly not 100 percent automatic, and some of the functionality may not be available in older
versions, but the apps will still work.
But that said, there's also not a lot of work.
So Google have actually produced a ton of support libraries, to make sure that older Android devices, running
older versions of Android, can still take advantage of some of these newer features.
Now you do have to tell Android that you want to support these older devices, and we've seen a bit
of that
when we checked the Compatibility box when creating new projects in Android studio. And I've also pointed
out that our activities have been extending AppCompatActivity rather than Activity, which makes sure that
they use the compatibility library, so that they'll therefore work on earlier versions.
Now there's another compatibility library that handles Material Design on older versions of Android,
so we'll be using that in our Flickr Browser app, to see what's involved.
So bottom line, it's not a huge job but it is a change,
so you need to make sure that you are specifically telling Android how to do that. So why bother?
Well, think of it this way - the vast number of users take a long time to upgrade their phones to a new
version of Android, and some frankly may never upgrade.
Now there's lots of Android devices, for example, that don't enable upgrades or can't be upgraded
past a specific version.
So if you don't support those users in some way, shape or form, then they may never get to see your apps.
So possibly you could be alienating yourself from a large percentage, and probably the majority of Android
users, if you don't support at least some previous versions.
And the way that Google Play works for your users, they won't even see your app to download unless their devices
support your version.
So in other words, if you're only producing an Android Oreo version of your app, it could be the best game
out there or the best application,
but if a potential downloader is running an older version of Android, they won't even see it listed
in the Google Play Store.
So Google make sure that you only see a filtered version of what can be downloaded onto their devices.
So really, you know, this to me is a no-brainer.
You need to be focusing on making sure that you support at least a certain percentage of these previous
users on older devices,
and I'd go as far as to say, it's essential for you to be doing this. And again, with only a little bit more work,
you can support and potentially get downloads of your app from a pile of users.
So we're going to be using this from this point forward in the course, so that you can apply the concepts
you learn to your apps that you're developing yourself.
Alright so Google have got a pretty good description and discussion of the Support Library at the link
on the screen,
so let's actually swing over to a browser and check that out.
Alright, so we're on that page now, and the Android Support Library serves three purposes.
Firstly it offers backward compatible versions of new features.
It also provides useful UI elements that aren't included in the framework, such as the recycler view that we're using
in the Flickr app, and also provides a range of utilities that apps can use as needed.
So it's actually worth having a read through this document, and also following the links to learn a bit
more about the features of the Support Library.
So scrolling down a little bit, we get to this title here, Using Support versus Framework APIs.
So that gives you some guidelines on when you should use the support libraries, the compat version of things
in your app.
Now the third paragraph here may not make sense immediately.
It's basically saying that you can use compat classes to take advantage of features that aren't yet
available.
So if you use ActivityCompact instead of Activity, then you can add new features to your app without
having to make huge changes.
And we'll actually be seeing that in a later section. Now the note's also interesting, down here - not every
class has an equivalent in the support library.
So there may be some things introduced with newer Android versions that won't work on earlier versions.
Now you can either stop supporting the older version, changing the min SDK level to a higher version,
or test the version of Android in your code.
So that lets you make extra functionality available on your versions, while still allowing the rest of
the app to work on older versions.
Now there's another page that's actually worth looking at.
So I'm just going to open that in a new tab.
Now this is an old blog post, going back from, or back to May 2015.
But that's when Material Design was introduced to Android.
So if you scroll down and have a look it actually contains lots of good information and sample code,
and even some videos demonstrating the effects. So definitely spend some time with the documentation
because that's how you'll learn about cool new things, and also how to really use the existing features
and get the most from the classes and widgets that Android provides.
Alright so I'm going to finish the video here. In the next video we're going to start work on modifying
the user interface for the app, and see how to use Material Design in a compatible way, to make the app
look good on all the versions of Android that we'll be supporting.
So I'll see you in the next video.