1
00:00:00,540 --> 00:00:07,080
We'll come back often enough, you have a requirement or you have an idea for a specific feature and

2
00:00:07,080 --> 00:00:13,920
then you try to develop it, and this can take quite some time, depending on how complex the example

3
00:00:13,920 --> 00:00:15,020
is that you want to build.

4
00:00:15,030 --> 00:00:18,870
And in general, how much code will be required to build that.

5
00:00:19,170 --> 00:00:24,870
It often enough makes more sense to not build something yourself, but use a third party, a library

6
00:00:24,870 --> 00:00:27,930
in order to at least use that specific feature.

7
00:00:28,290 --> 00:00:33,150
And that is the beauty that we have nowadays, that there are so many of them.

8
00:00:33,150 --> 00:00:35,280
There are so many different third party libraries.

9
00:00:35,280 --> 00:00:37,670
We just need to use the ones that we need.

10
00:00:37,680 --> 00:00:43,830
We need to import them into our application and to use them accordingly.

11
00:00:44,190 --> 00:00:49,950
And I'm just going to show you one example, which is the circle image for you by age, Dudenhoeffer,

12
00:00:50,670 --> 00:00:56,340
who has built a little third party library, which we can use in order to get these rounded images,

13
00:00:56,340 --> 00:01:02,190
because by default, images look like the one you can see here at the top, which is this image of you.

14
00:01:02,410 --> 00:01:09,330
And then when you want to have a circular image, you then a third party library is the better choice.

15
00:01:09,330 --> 00:01:12,090
Of course, you could go ahead and try to build it yourself, but.

16
00:01:13,180 --> 00:01:18,910
Why should you, if there is a great third party library that you can use and there are third party

17
00:01:18,910 --> 00:01:25,090
libraries for so many different things and very many things are done, very complicated.

18
00:01:25,390 --> 00:01:32,210
Li in Android studio and an Android in general where third party libraries make your life so much easier.

19
00:01:32,710 --> 00:01:37,600
So, for example, he says, in order to use this application, you need of course to have an application.

20
00:01:37,600 --> 00:01:37,940
Right?

21
00:01:37,960 --> 00:01:45,130
Then you need to implement this dependency and then in order to use it, you can use this code in an

22
00:01:45,130 --> 00:01:45,910
XML file.

23
00:01:46,870 --> 00:01:51,790
Of course, there are some limitations and the general what I would highly recommend you to do is to,

24
00:01:51,790 --> 00:01:59,110
of course, also always check out the whole page and the whole examples and everything about a third

25
00:01:59,110 --> 00:02:04,810
party libraries that want to use because maybe there are some problems that can occur or maybe they

26
00:02:04,810 --> 00:02:08,470
just generally have some advice on how to use the third party library.

27
00:02:09,220 --> 00:02:09,690
All right.

28
00:02:10,090 --> 00:02:14,050
So what we need is we need to create a new project.

29
00:02:15,740 --> 00:02:20,090
Then to add this implementation into built up gradle.

30
00:02:21,450 --> 00:02:28,740
An app file, which is when you go to your apps here, gradle scripts, you have this built gradle module

31
00:02:28,740 --> 00:02:28,950
app.

32
00:02:28,950 --> 00:02:30,990
That's the one inside of that file.

33
00:02:30,990 --> 00:02:37,260
You go to dependencies, you have to scroll it a little further down and then you have to add this line

34
00:02:37,260 --> 00:02:39,360
here, which is implementation so and so.

35
00:02:39,600 --> 00:02:42,790
And once you add that, you need to sink your file.

36
00:02:42,810 --> 00:02:45,690
So if I get rid of that, you can see I have this thing now button.

37
00:02:46,350 --> 00:02:53,880
If I add that back in, I now need to go ahead and sink it in order for it to load all of its required

38
00:02:53,880 --> 00:03:00,810
functionality so this can be multiple different classes or just copy whatever the developer has programmed

39
00:03:00,810 --> 00:03:05,700
that we need to use in order to use this functionality that he has developed.

40
00:03:06,270 --> 00:03:06,710
All right.

41
00:03:07,140 --> 00:03:14,190
So once that is done, you can go ahead to your resources and to your layout and then pretty much use.

42
00:03:15,200 --> 00:03:23,400
This little example here, so here, DEA agent, have whole circle in you thought circle image of.

43
00:03:25,060 --> 00:03:30,730
And that is basically what he has given you as, quote, a snippet here.

44
00:03:32,560 --> 00:03:37,780
Only that I have some constraints here at the bottom, and of course, I have another image for you,

45
00:03:38,170 --> 00:03:45,340
an expert compared immature, which is this wide image that we have here at the top of simple image

46
00:03:45,340 --> 00:03:46,780
and Ivy, circular image.

47
00:03:46,960 --> 00:03:53,140
And now, of course, in the code, if you want to use it, you can just go ahead and use this set image

48
00:03:53,140 --> 00:03:55,900
drawable and then say which image you want to use.

49
00:03:56,290 --> 00:04:02,800
And here, contacts, compact, get drawable, then pass the context and the trouble that you want to

50
00:04:02,800 --> 00:04:03,240
use.

51
00:04:03,250 --> 00:04:09,850
And of course, I have this trouble here, which is this image of PMG, which is this Android image.

52
00:04:10,750 --> 00:04:11,200
All right.

53
00:04:11,200 --> 00:04:15,610
At this point, I would recommend you search for third party libraries, for features that you might

54
00:04:15,610 --> 00:04:17,800
want to use in your future applications.

55
00:04:17,810 --> 00:04:24,760
So the idea is that you have yourself or maybe a customer of you requires you to have some functionality

56
00:04:24,760 --> 00:04:26,080
or use some functionality.

57
00:04:26,440 --> 00:04:31,250
Then I would recommend you try to implementor and use its functionality.

58
00:04:31,510 --> 00:04:33,930
Of course, we're going to have multiple examples for this.

59
00:04:33,940 --> 00:04:35,250
We're going to use Google Maps.

60
00:04:35,260 --> 00:04:42,940
We're going to use also texta, which allows us to have an easier job at asking for permissions when

61
00:04:42,940 --> 00:04:48,220
we want to use, for example, the camera or the gallery or the location of the user and so forth.

62
00:04:48,430 --> 00:04:53,830
So there will be plenty of situations where we will touch third party libraries again.

63
00:04:54,070 --> 00:04:59,950
But I would still recommend to check out your own examples and just browse the web for whatever you

64
00:04:59,950 --> 00:05:01,930
can think of and try to implement that.

65
00:05:02,290 --> 00:05:08,650
Just Google for some cool third party libraries and try to get them from GitHub, because in most cases

66
00:05:08,650 --> 00:05:11,140
you will find third party libraries on GitHub.

67
00:05:11,890 --> 00:05:12,440
All right.

68
00:05:12,580 --> 00:05:15,130
So good luck with that and see you in the next video.

