1
00:00:00,149 --> 00:00:04,296
♪ (upbeat electronic music) ♪

2
00:00:05,464 --> 00:00:07,844
Okay, now you have seen
what exactly is Android.

3
00:00:07,844 --> 00:00:10,844
So, now it's time to create
your very first app in Android.

4
00:00:10,844 --> 00:00:12,604
In this particular slide,

5
00:00:12,604 --> 00:00:15,074
we are going to cover
about Android Studio,

6
00:00:15,074 --> 00:00:17,284
create our very first
"Hello World" app,

7
00:00:17,284 --> 00:00:19,214
and we're going to understand

8
00:00:19,214 --> 00:00:23,214
the basic app development
workflow in Android Studio.

9
00:00:23,227 --> 00:00:26,207
And then, run our app
in a virtual device,

10
00:00:26,207 --> 00:00:28,657
and even in a physical device.

11
00:00:28,885 --> 00:00:31,785
The prerequisites for
Android application development

12
00:00:31,785 --> 00:00:34,495
will be Java 
programming language,

13
00:00:34,495 --> 00:00:36,665
and you need to have a good idea

14
00:00:36,665 --> 00:00:40,085
about object-oriented 
programming, and XML--

15
00:00:40,085 --> 00:00:43,435
how exactly you put properties
and attributes in XMLs.

16
00:00:43,435 --> 00:00:46,365
And you need to have 
a good idea of IDE,

17
00:00:46,365 --> 00:00:49,055
a prior IDE,
it doesn't really matter,

18
00:00:49,055 --> 00:00:51,545
an IDE which you
have used in the past.

19
00:00:51,545 --> 00:00:53,915
And we will see how exactly
we work around

20
00:00:53,915 --> 00:00:55,495
with our Android Studio.

21
00:00:55,697 --> 00:00:57,937
So your Android Studio 
will look like this,

22
00:00:57,937 --> 00:01:00,257
and it will contain many tools,

23
00:01:00,257 --> 00:01:03,427
like de-buggers, logcat,

24
00:01:03,427 --> 00:01:05,687
monitors, emulators.

25
00:01:05,687 --> 00:01:08,087
So we're going to look 
at each one of them

26
00:01:08,087 --> 00:01:09,527
in coming slides.

27
00:01:09,527 --> 00:01:11,207
First of all, we need to learn

28
00:01:11,207 --> 00:01:14,207
how exactly we can install
Android Studio in our machines.

29
00:01:14,207 --> 00:01:16,477
So, first we need
to download JDK.

30
00:01:16,477 --> 00:01:22,957
So, we'll go to our browser,
and type "download JDK."

31
00:01:24,477 --> 00:01:27,427
Download the latest one, JDK 8.

32
00:01:27,427 --> 00:01:30,367
This will take you
to the Oracle website.

33
00:01:31,448 --> 00:01:33,408
Accept the license agreement,

34
00:01:33,408 --> 00:01:35,288
and download it 
for whatever the machine

35
00:01:35,288 --> 00:01:36,818
you are working with.

36
00:01:36,818 --> 00:01:39,608
For me, it's Mac,
so I will download that.

37
00:01:39,993 --> 00:01:43,143
Once your JDK is downloaded,
install your JDK.

38
00:01:45,626 --> 00:01:47,676
Install your JDK.

39
00:01:49,799 --> 00:01:54,909
And, <i>Continue, Install</i>
(typing)

40
00:01:59,322 --> 00:02:02,862
The steps in Windows
will be pretty much the same.

41
00:02:02,862 --> 00:02:04,132
(installer chimes)

42
00:02:04,787 --> 00:02:07,007
Once the JDK is installed,

43
00:02:07,007 --> 00:02:12,427
now, next you can go through
downloading your Android Studio.

44
00:02:13,194 --> 00:02:17,194
Just type 
"download Android Studio".

45
00:02:19,561 --> 00:02:23,121
And, just click on the link.

46
00:02:23,121 --> 00:02:25,201
It will take you 
to the developer website,

47
00:02:25,201 --> 00:02:27,961
and from here, you can
download Android Studio.

48
00:02:28,228 --> 00:02:31,998
It will identify automatically
in which machine you are working,

49
00:02:31,998 --> 00:02:35,158
and it will give you--
if you are working with Mac,

50
00:02:35,158 --> 00:02:38,018
it will give you Android Studio,
Mac version.

51
00:02:38,018 --> 00:02:40,558
If you are working with Windows,

52
00:02:40,558 --> 00:02:43,668
it will give you Android Studio
with Windows version.

53
00:02:43,668 --> 00:02:46,148
Or, the same goes with Linux.

54
00:02:46,148 --> 00:02:50,838
So, download the Android Studio,
accept the license and download.

55
00:02:51,488 --> 00:02:53,888
Once your Android Studio
is downloaded,

56
00:02:53,888 --> 00:02:57,218
you can start installing
your Android Studio.

57
00:02:57,748 --> 00:03:02,348
In Mac, you can just drag
and drop in Applications folder.

58
00:03:02,348 --> 00:03:05,548
In Windows, you will just
double-click your Android Studio

59
00:03:05,548 --> 00:03:08,188
and it will get you to Windows,

60
00:03:08,188 --> 00:03:10,968
and from there you just have 
to follow the instructions,

61
00:03:10,968 --> 00:03:14,968
and that's next-- and install.

62
00:03:15,700 --> 00:03:19,320
And then, you can go here,
you'll see Android Studio here.

63
00:03:19,320 --> 00:03:21,560
Press on Android Studio--

64
00:03:23,670 --> 00:03:27,210
click on Android Studio
and <i>Open</i>.

65
00:03:36,317 --> 00:03:38,597
Now, for the very first time,

66
00:03:38,597 --> 00:03:42,017
It will ask you for 
installation of SDK.

67
00:03:42,017 --> 00:03:45,257
By default, it always installs
the latest SDK.

68
00:03:45,257 --> 00:03:47,647
Where exactly you want 
to install your SDK,

69
00:03:47,647 --> 00:03:48,907
so this will be the path.

70
00:03:48,907 --> 00:03:52,687
You just click 
on <i>Next</i>, and <i>Finish</i>.

71
00:03:59,115 --> 00:04:03,115
So, once the latest component
has been downloaded,

72
00:04:03,115 --> 00:04:06,975
press <i>Finish</i>,
and you will get to this screen.

73
00:04:06,975 --> 00:04:09,115
Now, from here on,

74
00:04:09,115 --> 00:04:12,825
before right away getting 
into creating a new project,

75
00:04:12,825 --> 00:04:16,355
you'll click on <i>Configure</i>,
and click on <i>SDK Manager</i>.

76
00:04:16,355 --> 00:04:18,425
What exactly we are doing here is

77
00:04:18,425 --> 00:04:22,575
we are installing further SDK's, 
which we will be needing

78
00:04:22,575 --> 00:04:25,565
while we are developing
our Android applications.

79
00:04:27,186 --> 00:04:30,516
Either you can install 
SDK's from here,

80
00:04:30,516 --> 00:04:34,926
just click on Android 7.1,
or whichever version you want.

81
00:04:34,926 --> 00:04:37,976
Just click on that and press <i>OK</i>.

82
00:04:37,976 --> 00:04:42,236
Or, you can always go 
on Launch Standalone SDK.

83
00:04:44,833 --> 00:04:47,553
Launch Standalone SDK
will give you more freedom

84
00:04:47,553 --> 00:04:50,413
to install your Android versions.

85
00:04:50,413 --> 00:04:55,183
For example, in your 
Android 7.1.1, API 25,

86
00:04:55,183 --> 00:04:58,743
you don't really need 
a system image of Android TV,

87
00:04:58,743 --> 00:05:00,833
because we are 
not going to design--

88
00:05:00,833 --> 00:05:04,833
or, this development is not 
going to be for your Android TV.

89
00:05:04,833 --> 00:05:10,063
We might need Google API
Intel x86 Adam 64 System Image.

90
00:05:10,946 --> 00:05:14,946
If I am using 64, 
so I don't need x86.

91
00:05:15,406 --> 00:05:19,956
So, you see, you can select
whatever you want to download,

92
00:05:19,956 --> 00:05:23,496
and whatever you
don't want to download.

93
00:05:24,130 --> 00:05:26,730
So, this is for your latest.

94
00:05:27,820 --> 00:05:30,910
If you want to work 
with other versions also,

95
00:05:30,910 --> 00:05:34,570
you just have to go
inside those versions.

96
00:05:34,570 --> 00:05:37,260
You just have 
to click those versions,

97
00:05:37,260 --> 00:05:40,260
and select whatever you want

98
00:05:40,260 --> 00:05:42,670
to download 
inside those versions.

99
00:05:42,670 --> 00:05:44,790
Like in Android 6.0,

100
00:05:44,790 --> 00:05:47,400
you definitely want
SDK Platform.

101
00:05:47,400 --> 00:05:48,650
You don't want TV.

102
00:05:48,650 --> 00:05:51,600
You don't want Wear
system images installed.

103
00:05:51,600 --> 00:05:54,320
You don't want Android Wear
system images also.

104
00:05:54,320 --> 00:05:57,600
Then, you don't want ARM
system images also.

105
00:05:57,600 --> 00:06:00,560
Now, ARM is again
a system image,

106
00:06:00,560 --> 00:06:04,560
or it gives you an emulator
which can run your application,

107
00:06:04,560 --> 00:06:07,240
but ARM machines are slower.

108
00:06:07,240 --> 00:06:10,060
So, that's why 
we need Intel machines,

109
00:06:10,060 --> 00:06:13,510
which are pretty faster
as compared to ARM.

110
00:06:13,880 --> 00:06:15,470
Now, in that context also,

111
00:06:15,470 --> 00:06:21,990
I could have chosen 
Intel, normal machine.

112
00:06:21,990 --> 00:06:26,920
But, I will be choosing 
Google API's Intel machine here,

113
00:06:26,920 --> 00:06:30,090
maybe 64-bit, or 32-bit,

114
00:06:30,090 --> 00:06:32,180
according to your
system configuration.

115
00:06:32,180 --> 00:06:34,560
Why Google API's Intel machine?

116
00:06:34,560 --> 00:06:36,590
Because it gives you 
all the features

117
00:06:36,590 --> 00:06:39,430
which you have 
in your normal Intel machine,

118
00:06:39,430 --> 00:06:43,690
plus it always provides you
with more freedom

119
00:06:43,690 --> 00:06:46,640
to use your Google API's also.

120
00:06:46,640 --> 00:06:49,380
So, if you are using a
Google API Intel machine,

121
00:06:49,380 --> 00:06:53,580
then you might have to download
Google API's also.

122
00:06:53,756 --> 00:06:56,456
And then, you definitely need

123
00:06:56,456 --> 00:06:58,606
the source code 
for your Android SDK.

124
00:06:59,605 --> 00:07:02,085
Now, this is for one 
of the stable versions

125
00:07:02,085 --> 00:07:06,085
in the higher one, but if you want 
a minimum version also,

126
00:07:06,085 --> 00:07:09,705
like we'll be working with 
one of the minimum versions,

127
00:07:09,705 --> 00:07:13,705
with API 15, 
you are free to select

128
00:07:13,705 --> 00:07:16,665
whichever version you want
as your minimum version.

129
00:07:16,995 --> 00:07:20,495
You can go ahead and install

130
00:07:20,495 --> 00:07:24,085
stuff from that 
particular version also.

131
00:07:24,085 --> 00:07:27,785
Like we need SDK platform, we are
not going to work with ARM.

132
00:07:27,785 --> 00:07:30,705
And here, also, 
we'll be working with

133
00:07:30,705 --> 00:07:36,555
Google API Intel x86 machine,
and Google APIs,

134
00:07:36,555 --> 00:07:39,235
and source code for SDK.

135
00:07:41,135 --> 00:07:45,735
Like I said before, you can 
download ARM and other machines,

136
00:07:45,735 --> 00:07:49,795
but it's of no use, 
because we won't be using them.

137
00:07:49,795 --> 00:07:52,645
We want our application 
to be running

138
00:07:52,645 --> 00:07:55,075
in a pretty faster manner,
so for that purpose

139
00:07:55,075 --> 00:08:00,111
we need Intel machines
with the Google API's in them.

140
00:08:00,773 --> 00:08:03,823
After that, just 
go to the bottom,

141
00:08:03,823 --> 00:08:06,293
just come to the Extras section.

142
00:08:06,293 --> 00:08:10,023
In that Extras section, you will
require Google Play services

143
00:08:10,023 --> 00:08:12,913
if you want to use 
any Google API's,

144
00:08:12,913 --> 00:08:18,243
like Maps, or the billing system
of Google API.

145
00:08:19,123 --> 00:08:23,473
And then, for Windows,
you might require

146
00:08:23,473 --> 00:08:29,113
Intel x86 Emulator Accelerator

147
00:08:29,113 --> 00:08:33,113
to run your Intel machine
in your Windows phone.

148
00:08:34,771 --> 00:08:38,811
And then, you can just click
on <i>Install Packages</i>,

149
00:08:38,811 --> 00:08:41,371
accept the license.

150
00:08:41,371 --> 00:08:44,491
Accept the license 
for other options also,

151
00:08:44,491 --> 00:08:46,391
and click on <i>Install</i>.

152
00:08:46,391 --> 00:08:50,151
And this will start installing
your other Android SDK.

153
00:08:50,151 --> 00:08:53,391
So now, you have seen how 
to install the Android Studio.

154
00:08:53,391 --> 00:08:55,231
So let's just learn
how to create

155
00:08:55,231 --> 00:08:57,801
your very first application,
"Hello, World" application.

156
00:08:57,801 --> 00:09:00,461
This will be the very first
screen you will be seeing,

157
00:09:00,461 --> 00:09:02,421
and you can create a new project

158
00:09:02,421 --> 00:09:04,301
by clicking on the 
very first option,

159
00:09:04,301 --> 00:09:06,121
<i>Start A New Android Project</i>.

160
00:09:06,121 --> 00:09:08,451
Or, you can always 
create a new project

161
00:09:08,451 --> 00:09:10,801
from inside the Android Studio.

162
00:09:10,801 --> 00:09:12,981
You will get transferred
to this screen,

163
00:09:12,981 --> 00:09:16,161
and this is where you put
the name of your application,

164
00:09:16,161 --> 00:09:18,341
what you want 
to name your application,

165
00:09:18,341 --> 00:09:20,151
and the project location,

166
00:09:20,151 --> 00:09:22,711
where exactly you want
your application to be saved.

167
00:09:22,711 --> 00:09:24,611
After that, you 
will get transferred

168
00:09:24,611 --> 00:09:26,971
to the different templates.

169
00:09:26,971 --> 00:09:29,101
>From all those different
templates,

170
00:09:29,101 --> 00:09:31,721
we will select <i>Empty Template</i>,
as we want to start

171
00:09:31,721 --> 00:09:33,451
from the very scratch.

172
00:09:33,451 --> 00:09:36,081
Next, we will give the name
to our activity.

173
00:09:36,081 --> 00:09:38,561
Like I said before, 
activity is a screen,

174
00:09:38,561 --> 00:09:41,111
and we want to create 
our very first screen

175
00:09:41,111 --> 00:09:42,621
for the application.

176
00:09:42,621 --> 00:09:45,901
And activity is 
not just a Java code,

177
00:09:45,901 --> 00:09:48,701
it contains the UI part also.

178
00:09:48,701 --> 00:09:52,921
So it will have a Java file,
plus a XML file also,

179
00:09:52,921 --> 00:09:55,241
which will contain its UI part.

180
00:09:55,488 --> 00:09:58,748
So we will name Java file
as <i>MainActivity</i>,

181
00:09:58,748 --> 00:10:02,128
and XML file as<i>
activity_main</i>.

182
00:10:02,277 --> 00:10:04,537
This is how your 
Android Studio will appear

183
00:10:04,537 --> 00:10:06,157
at the very starting.

184
00:10:06,157 --> 00:10:09,427
As you can see, on your left
is your Project Files.

185
00:10:09,427 --> 00:10:13,707
>From this pane, you can
navigate through your project,

186
00:10:13,707 --> 00:10:16,267
or you can click 
on any one of these files,

187
00:10:16,267 --> 00:10:18,167
and you can open those files.

188
00:10:18,167 --> 00:10:22,167
In the middle, you have
Layout Editor or Code Area,

189
00:10:22,167 --> 00:10:26,167
where you can either create 
your layout, UIs, drag and drop,

190
00:10:26,167 --> 00:10:29,967
or, you will be writing 
your code in this middle area.

191
00:10:29,967 --> 00:10:33,662
At the bottom is
known as Console Area,

192
00:10:33,662 --> 00:10:36,972
where you will see
the status reports,

193
00:10:36,972 --> 00:10:41,072
or logcats, log messages
of your application,

194
00:10:41,072 --> 00:10:43,672
or the application 
you are creating.

195
00:10:43,764 --> 00:10:45,824
When we talk about
project folders,

196
00:10:45,824 --> 00:10:47,034
there will be four folders.

197
00:10:47,034 --> 00:10:49,064
First will be manifest folder,

198
00:10:49,064 --> 00:10:51,104
which will contain 
a manifest file,

199
00:10:51,104 --> 00:10:53,654
which will give you 
the information

200
00:10:53,654 --> 00:10:56,184
about the application itself.

201
00:10:56,184 --> 00:11:00,034
Next will be java, which will
contain all your Java code.

202
00:11:00,034 --> 00:11:03,274
Next will be res, which will
contain all your resources.

203
00:11:03,274 --> 00:11:05,614
It can be a layout,
it can be a string,

204
00:11:05,614 --> 00:11:08,074
it can be images,
it can be audio files.

205
00:11:08,074 --> 00:11:11,424
So all those resources will be
kept inside your res folder.

206
00:11:12,422 --> 00:11:15,612
Last will be <i>build.gradle</i> files.

207
00:11:15,612 --> 00:11:18,822
So, <i>build.gradle</i> files will
give you the information

208
00:11:18,822 --> 00:11:22,032
about building your
project and app and module.

209
00:11:22,032 --> 00:11:24,912
We will see about this
in further slides.

210
00:11:25,135 --> 00:11:27,425
So, let me talk about Gradle.

211
00:11:27,425 --> 00:11:30,925
Gradle is a building tool
used by your Android Studio.

212
00:11:30,925 --> 00:11:33,705
And there are basically
three types of Gradle files:

213
00:11:33,705 --> 00:11:35,905
first, project-level 
Gradle files,

214
00:11:35,905 --> 00:11:39,195
module-level Gradle files,
and settings Gradle files.

215
00:11:39,195 --> 00:11:42,245
What, exactly, a project-level
Gradle file contains?

216
00:11:42,245 --> 00:11:44,045
A project-level Gradle file

217
00:11:44,045 --> 00:11:46,945
will contain the information
about Gradle itself.

218
00:11:46,945 --> 00:11:49,745
What is the version
of Gradle you are using,

219
00:11:49,745 --> 00:11:52,865
and what kind of 
repositories you are using

220
00:11:52,865 --> 00:11:54,505
inside your application.

221
00:11:54,505 --> 00:11:57,645
So, there will be one project
Gradle file per application.

222
00:11:57,645 --> 00:12:00,305
Next will be module Gradle file.

223
00:12:00,305 --> 00:12:03,155
Now, there can be one
module Gradle file,

224
00:12:03,155 --> 00:12:05,315
or more than one
module Gradle file.

225
00:12:05,315 --> 00:12:08,245
It depends upon the
number of modules

226
00:12:08,245 --> 00:12:10,275
you are making 
for your application.

227
00:12:10,275 --> 00:12:13,875
Now, if you are creating an app,
let's say a weather application

228
00:12:13,875 --> 00:12:17,415
for mobile also, for Wear also,
and for TV also,

229
00:12:17,415 --> 00:12:20,445
now there will be three
module Gradle files,

230
00:12:20,445 --> 00:12:23,665
giving the information
about each module.

231
00:12:23,665 --> 00:12:26,395
Each module Gradle file 
gives you the information

232
00:12:26,395 --> 00:12:30,585
about each module,

233
00:12:30,585 --> 00:12:33,735
like in which version you are
creating that particular module,

234
00:12:33,735 --> 00:12:36,895
what is the minimum version,
what is the maximum version,

235
00:12:36,895 --> 00:12:39,195
what is the application IDE,

236
00:12:39,195 --> 00:12:41,515
or what are all the 
dependencies,

237
00:12:41,515 --> 00:12:43,555
so that will give you 
the information

238
00:12:43,555 --> 00:12:45,765
about the module-level 
Gradle file.

239
00:12:45,765 --> 00:12:48,025
Last is known 
as settings Gradle file.

240
00:12:48,025 --> 00:12:50,165
Settings Gradle file 
gives you the information

241
00:12:50,165 --> 00:12:53,845
about which module you want 
to include for your compilation.

242
00:12:53,845 --> 00:12:57,325
So, if you just want to 
compile your mobile module,

243
00:12:57,325 --> 00:12:58,955
then you will just include

244
00:12:58,955 --> 00:13:00,835
the mobile module
inside the Gradle file.

245
00:13:00,835 --> 00:13:03,495
If you want to compile
mobile plus TV,

246
00:13:03,495 --> 00:13:06,865
then you will include 
mobile module plus TV module.

247
00:13:07,890 --> 00:13:09,560
For more information,

248
00:13:09,560 --> 00:13:12,240
you can follow the link
about the Gradle.

249
00:13:13,367 --> 00:13:18,357
Now, once you have 
followed all these steps,

250
00:13:18,357 --> 00:13:23,147
there will be a default 
app for you, "Hello World".

251
00:13:23,147 --> 00:13:25,567
So, how do you run
that application?

252
00:13:25,567 --> 00:13:29,997
There is a Run button
at the top,

253
00:13:29,997 --> 00:13:31,997
you click on that Run button,

254
00:13:31,997 --> 00:13:34,607
and it will ask you for
a virtual device.

255
00:13:34,607 --> 00:13:37,207
So, you can always
create a virtual device.

256
00:13:37,207 --> 00:13:40,587
There will be a button,<i>
Create New Virtual Device</i>,

257
00:13:40,587 --> 00:13:44,647
or you can go to your
Android AVD Manager,

258
00:13:44,647 --> 00:13:47,867
that is, Android
Virtual Device Manager.

259
00:13:47,867 --> 00:13:50,537
>From there, you can 
choose the hardware--

260
00:13:50,537 --> 00:13:52,517
which hardware you want to use,

261
00:13:52,517 --> 00:13:56,517
and for which resolution 
you want to create an emulator,

262
00:13:56,517 --> 00:13:58,657
either Nexus 4 or Nexus 5.

263
00:13:58,657 --> 00:14:02,617
And then, click on one of the 
hardware resolutions.

264
00:14:02,617 --> 00:14:05,667
Click on <i>Next</i>, and then 
you can choose which version

265
00:14:05,667 --> 00:14:08,277
you want to install 
in that particular hardware,

266
00:14:08,277 --> 00:14:10,717
Android 7.0 and Android 6.0.

267
00:14:10,717 --> 00:14:12,797
Now, please be apprised that

268
00:14:12,797 --> 00:14:16,547
whichever SDK you downloaded
at the time of installation,

269
00:14:16,547 --> 00:14:20,547
only those system images
will come here.

270
00:14:21,131 --> 00:14:24,131
So, whichever system images

271
00:14:24,131 --> 00:14:26,601
you downloaded 
at the time of SDK installation,

272
00:14:26,601 --> 00:14:29,161
only those system images
will come inside this,

273
00:14:29,161 --> 00:14:31,691
and you can use one of those
system images here.

274
00:14:31,691 --> 00:14:35,311
And then, you can give the name
to your Android Virtual Device,

275
00:14:35,311 --> 00:14:37,371
and then click <i>Finish</i>.

276
00:14:37,371 --> 00:14:40,851
And it will give you your 
Android emulator,

277
00:14:40,851 --> 00:14:43,511
and this is how your
Android emulator looks like.

278
00:14:44,239 --> 00:14:48,009
You can always make your real
device also as a testing device.

279
00:14:48,009 --> 00:14:51,809
For that to happen, you have 
to make your real device

280
00:14:51,809 --> 00:14:55,699
a developer device, 
or you have to turn on your device

281
00:14:55,699 --> 00:14:57,339
in developer mode.

282
00:14:57,339 --> 00:14:58,769
How do you do that?

283
00:14:58,769 --> 00:15:01,589
Go to <i>Settings</i>,
click on <i>About Phone</i>,

284
00:15:01,589 --> 00:15:03,819
and inside there will be
build number.

285
00:15:03,819 --> 00:15:06,499
Now, tap into the build number
seven times.

286
00:15:06,499 --> 00:15:08,149
Yeah, seven times.

287
00:15:08,149 --> 00:15:11,429
And then you will see that
the developer option,

288
00:15:11,429 --> 00:15:14,109
which was hidden before
into the settings,

289
00:15:14,109 --> 00:15:16,009
is available now.

290
00:15:16,009 --> 00:15:18,709
Now, go inside 
the developer option,

291
00:15:18,709 --> 00:15:21,289
and turn on your
USB Debugging mode.

292
00:15:21,289 --> 00:15:25,289
And there you go-- your device
is now a developer device.

293
00:15:25,289 --> 00:15:28,249
Now, this is the first part.

294
00:15:28,249 --> 00:15:31,069
If you are using Mac,
this is all you have to do.

295
00:15:31,069 --> 00:15:33,699
Now you have to connect 
your USB cable to your machine,

296
00:15:33,699 --> 00:15:36,459
and you will be able 
to run your applications.

297
00:15:36,459 --> 00:15:38,899
But if you are not using Mac,

298
00:15:38,899 --> 00:15:42,389
if you are using Windows
or Linux machines,

299
00:15:42,389 --> 00:15:44,319
then you might have to download

300
00:15:44,319 --> 00:15:47,049
USB drivers for 
that particular device also,

301
00:15:47,049 --> 00:15:49,049
and install that 
in your machine.

302
00:15:49,049 --> 00:15:51,049
And after that, you connect
to the USB cables,

303
00:15:51,049 --> 00:15:53,189
and you will be able
to run your application

304
00:15:53,189 --> 00:15:54,999
in your real device also.

305
00:15:55,608 --> 00:15:59,938
As your app runs, and you
want to get the feedback,

306
00:15:59,938 --> 00:16:03,488
you want to see what exactly
is going on inside your app,

307
00:16:03,488 --> 00:16:06,458
so for that purpose 
we have a logcat tool,

308
00:16:06,458 --> 00:16:08,908
which is inside
your Android Monitor.

309
00:16:08,908 --> 00:16:10,998
Whenever you will be 
running your app,

310
00:16:10,998 --> 00:16:14,578
you will see this-- all the logs
inside your logcat popping up.

311
00:16:14,578 --> 00:16:16,638
So this will keep track

312
00:16:16,638 --> 00:16:19,388
of whatever is going on
inside your emulator,

313
00:16:19,388 --> 00:16:21,188
or your Android device.

314
00:16:21,188 --> 00:16:23,028
So, this is how you put a log.

315
00:16:23,028 --> 00:16:27,098
<i>Log.d</i> -- for debug mode -- 
give a tag and give the message.

316
00:16:27,098 --> 00:16:30,088
You will learn about logging 
in detail in further slides.

317
00:16:30,088 --> 00:16:32,948
So, this is how your 
logcat pane looks like.

318
00:16:32,948 --> 00:16:36,298
So you can see, you have
to enter a log statement

319
00:16:36,298 --> 00:16:39,318
inside your Java code,
and then at the bottom,

320
00:16:39,318 --> 00:16:42,868
you will see inside the Android
Monitor there is a logcat pane,

321
00:16:42,868 --> 00:16:45,378
and that's where you can see
whatever the log statement

322
00:16:45,378 --> 00:16:47,378
you have put inside
your Java code.

323
00:16:48,499 --> 00:16:51,089
To learn more,
you can follow these links

324
00:16:51,089 --> 00:16:54,079
about creating and managing
Android Virtual Studio

325
00:16:54,079 --> 00:16:56,569
and different platform versions.

326
00:16:56,791 --> 00:16:58,821
So next you can 
follow the concept

327
00:16:58,821 --> 00:17:01,661
in <i>Kit Book</i> exercise 1.1,

328
00:17:01,661 --> 00:17:04,521
and then we are going 
to go through with the practicals

329
00:17:04,521 --> 00:17:07,021
of creating your very first
Hello World app,

330
00:17:07,021 --> 00:17:08,831
and run it into the emulator.

331
00:17:09,159 --> 00:17:15,779
♪ (upbeat electronic music) ♪


