Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
0
1
00:00:00,720 --> 00:00:01,000
All right.
1
2
00:00:01,020 --> 00:00:08,610
So now that you've built and tested the 'I Am Rich' app on a emulator or a simulator, it's time to try
2
3
00:00:08,610 --> 00:00:11,010
and run it on a physical device.
3
4
00:00:11,010 --> 00:00:16,860
So, if you have a physical Android device and you would like to test your app on it, then follow along
4
5
00:00:16,860 --> 00:00:17,690
with this lesson.
5
6
00:00:17,700 --> 00:00:19,560
And that's exactly what we're gonna do.
6
7
00:00:19,710 --> 00:00:24,570
Now if you don't have an Android device, you can skip ahead to the next lesson where we show you how
7
8
00:00:24,570 --> 00:00:29,390
to test your app on a physical iOS device.
8
9
00:00:29,410 --> 00:00:29,680
All right.
9
10
00:00:29,810 --> 00:00:35,060
So there's quite a few steps that are involved in order to successfully be able to connect our Android
10
11
00:00:35,060 --> 00:00:36,890
device with the computer.
11
12
00:00:36,890 --> 00:00:39,650
And I'm going to walk you through them step by step.
12
13
00:00:39,740 --> 00:00:44,000
And it's really important that you do them in the order that we're showing you here.
13
14
00:00:44,000 --> 00:00:49,870
So the first step is you're going to go into your phone, and you're going to enable developer mode.
14
15
00:00:49,880 --> 00:00:56,420
So you're going to go into your Settings, and go on to About, and you're going to somehow locate something
15
16
00:00:56,420 --> 00:00:58,870
called your Build number.
16
17
00:00:58,880 --> 00:01:06,170
Now, on this HTC device that I'm showing you right here, it's under About, and then it's inside Software
17
18
00:01:06,170 --> 00:01:07,070
information.
18
19
00:01:07,490 --> 00:01:13,910
And then we have to go into More, in order to discover this thing called Build number.
19
20
00:01:13,940 --> 00:01:19,850
Now once you've discovered Build number, then you have to start tapping on it. And you're going to get
20
21
00:01:19,850 --> 00:01:24,440
a popup that tells you how many steps you are away from being a developer.
21
22
00:01:24,440 --> 00:01:25,520
So keep tapping.
22
23
00:01:25,640 --> 00:01:31,220
You have to tap a total of seven times before you get to join the secret club of Android developers.
23
24
00:01:31,220 --> 00:01:37,130
And now when you head back to the main settings, you'll get a new secret menu appear which is Developer
24
25
00:01:37,160 --> 00:01:38,190
options.
25
26
00:01:38,240 --> 00:01:44,500
And here, you have to make sure that USB debugging is enabled and click OK
26
27
00:01:44,510 --> 00:01:46,790
when it prompts you.
27
28
00:01:47,450 --> 00:01:54,740
Now once you enable USB debugging, this will allow your phone to be able to communicate with your computer.
28
29
00:01:55,670 --> 00:02:02,300
Depending on your phone make and the operating system, the version of Android that you're running,
29
30
00:02:02,300 --> 00:02:04,450
you might see a different user interface.
30
31
00:02:04,550 --> 00:02:10,560
So the Build number might be located, for example in this other Nexus device I've got here,
31
32
00:02:10,550 --> 00:02:17,750
you'll find the build number under Settings and under System and About. And it's here where it says about
32
33
00:02:17,750 --> 00:02:22,310
phone, that you can locate the Build number, which is the place that you have to tap on.
33
34
00:02:22,340 --> 00:02:26,160
So you might have to hunt around a little bit for this thing called Build number.
34
35
00:02:26,160 --> 00:02:32,390
But you can also have a quick google and find out for your version of your Android operating system
35
36
00:02:32,690 --> 00:02:37,280
and for your phone, where you can locate this Build number.
36
37
00:02:37,280 --> 00:02:43,130
And once you found it, tap it seven times to enable Developer mode, and then you'll be able to enable
37
38
00:02:43,130 --> 00:02:44,310
USB debugging.
38
39
00:02:45,020 --> 00:02:48,200
It's a bit of a treasure hunt if you will.
39
40
00:02:48,230 --> 00:02:55,400
Now, once you've successfully enabled USB debugging, then the next thing is to connect your phone to your
40
41
00:02:55,400 --> 00:02:57,640
computer with a USB.
41
42
00:02:57,770 --> 00:03:04,040
And strangely, this is one of the most common downfalls for students who are trying to test their device.
42
43
00:03:04,430 --> 00:03:07,650
Because, not all USB cables are equal.
43
44
00:03:08,300 --> 00:03:13,350
And some USB cables will only transfer power and not data.
44
45
00:03:13,490 --> 00:03:17,570
But of course, we need both power and data to be transferred.
45
46
00:03:17,570 --> 00:03:23,030
So ideally try and find the original cable that came with your phone. If not, make sure you've got a proper
46
47
00:03:23,030 --> 00:03:26,590
cable made by somebody decent.
47
48
00:03:26,780 --> 00:03:32,990
Now, once you've connected your phone with USB, what you should see on your phone is a prompt.
48
49
00:03:33,200 --> 00:03:40,190
So head over to your phone and take a look at the screen, and see if you have this popup asking you
49
50
00:03:40,430 --> 00:03:43,420
whether if you want to trust this computer.
50
51
00:03:43,550 --> 00:03:49,150
Now it's really important here that you check the box where it says always allow from this computer.
51
52
00:03:49,310 --> 00:03:53,720
So you don't have to deal with this popup every time you want to run your app. And then go ahead and
52
53
00:03:53,720 --> 00:03:55,930
click OK.
53
54
00:03:56,090 --> 00:04:02,480
So now, you've trusted this computer to receive data from it into your phone
54
55
00:04:02,480 --> 00:04:09,700
and we're finally ready to actually run the app from Android Studio. So here on the right, I've got my
55
56
00:04:09,700 --> 00:04:11,790
physical device showing,
56
57
00:04:11,950 --> 00:04:14,710
and here is my Android Studio.
57
58
00:04:15,100 --> 00:04:21,700
And you can see that after completing all of those steps successfully, I can actually see my device listed
58
59
00:04:22,030 --> 00:04:23,730
in this list of drop downs.
59
60
00:04:23,890 --> 00:04:26,490
And it's now ready to receive my app.
60
61
00:04:26,530 --> 00:04:28,990
So go ahead and make sure it's selected,
61
62
00:04:28,990 --> 00:04:30,280
then click on the play button.
62
63
00:04:35,680 --> 00:04:44,600
And now the app's been built, and it's now going to show the app on my HTC One physical device.
63
64
00:04:45,230 --> 00:04:46,950
And there it is. Success.
64
65
00:04:47,120 --> 00:04:55,430
We've managed to get our app loaded onto a physical device and showing on our phone. So if you're using
65
66
00:04:55,460 --> 00:04:58,760
a Google phone such as a Nexus or a Pixel,
66
67
00:04:58,760 --> 00:05:05,330
this usually is a pretty straightforward task. But if you're using a phone from a not a well-known make,
67
68
00:05:05,630 --> 00:05:09,440
then we've seen students encounter a lot of problems along the way.
68
69
00:05:09,890 --> 00:05:16,370
So if it is not working for you, and even after going through all those steps that I mentioned, step by
69
70
00:05:16,370 --> 00:05:23,690
step, and you still don't see your phone show up right here, then head over to the court resources under
70
71
00:05:23,690 --> 00:05:30,740
this module, you'll see a link to a troubleshooting document. Where we've listed some of the things that
71
72
00:05:30,740 --> 00:05:33,110
could go wrong and ways of solving it.
72
73
00:05:33,650 --> 00:05:35,400
But hopefully for everybody else,
73
74
00:05:35,540 --> 00:05:37,400
this should now be working.
74
75
00:05:37,490 --> 00:05:43,640
And if you have a computer that's maybe a little bit older and running the emulator is extremely slow,
75
76
00:05:43,970 --> 00:05:49,120
then you might want to consider simply running the apps onto your physical device every time.
76
77
00:05:49,220 --> 00:05:56,300
Because now your app doesn't require the computer and all it has to do is to send the package of code
77
78
00:05:56,600 --> 00:06:02,080
to your phone and your phone can use its resources to render the app.
78
79
00:06:02,120 --> 00:06:04,030
So that's another tip.
79
80
00:06:04,130 --> 00:06:11,010
Now on the next lesson, we're going to show you how to run your app onto a physical iPhone device.
80
81
00:06:11,090 --> 00:06:15,090
So if you want to be able to do that, then head over to the next lesson.
81
82
00:06:15,140 --> 00:06:19,220
Otherwise, you can skip ahead and continue to build our next app.
8985
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.