WEBVTT

00:00.080 --> 00:01.040
Welcome back.

00:01.080 --> 00:04.440
We downloaded the SSD mobile.

00:04.440 --> 00:06.160
Net version one model.

00:06.200 --> 00:08.080
Now let's move to Android Studio.

00:08.080 --> 00:09.520
Create a new project.

00:09.560 --> 00:11.720
Empty compose activity.

00:11.880 --> 00:17.080
Next name it as Object detection SSD mobile.

00:17.080 --> 00:20.080
Or you can see SSD SSD app.

00:20.240 --> 00:21.040
It's good.

00:21.040 --> 00:22.040
Click finish.

00:22.040 --> 00:28.360
Let me start by adding the libraries that we're going to use in our application.

00:28.640 --> 00:29.600
Of course.

00:29.960 --> 00:32.440
Let me add that TensorFlow.

00:32.600 --> 00:35.240
We can search for TensorFlow Android dependency.

00:35.600 --> 00:41.440
Copy them and we will use those libraries before in the previous videos.

00:41.440 --> 00:44.920
So there's no need to relecture them.

00:45.120 --> 00:48.080
This is for the Android TensorFlow.

00:48.200 --> 00:57.720
You can search online for those dependencies, or you can open the previous examples and copy the dependencies

00:57.720 --> 00:58.960
for the TensorFlow.

00:58.960 --> 01:03.630
So copy those dependencies and paste them here.

01:03.630 --> 01:12.350
And to solve those, uh, those, uh, errors, we need to open YAML file version here.

01:12.550 --> 01:15.230
Go to the previous project.

01:15.230 --> 01:20.910
Copy those paste them here, scroll down copy those.

01:21.030 --> 01:22.590
Scroll down to here.

01:22.790 --> 01:26.270
Paste them and everything should work fine.

01:26.310 --> 01:27.870
Sync the project here.

01:27.870 --> 01:29.750
We added TensorFlow.

01:29.750 --> 01:37.270
Now let's add the camera, copy the dependencies for camera and paste them here.

01:37.270 --> 01:40.670
Also you can search for Camerax Android dependencies.

01:40.750 --> 01:48.430
Get the Camerax from developer.android.com and the stable release is 1.5.0.

01:48.470 --> 01:55.390
This is the latest one you can see if you need to add camera lifecycle library.

01:55.390 --> 02:02.670
And this is what we used in the previous videos and in the previous sections Also, if you want additional

02:02.710 --> 02:09.230
use Camerax video capture, you can add this if you want to additional use Camerax view class.

02:09.390 --> 02:15.390
ML Kit vision integration and a Camerax extension library.

02:15.430 --> 02:18.350
Okay, copy this dependency.

02:18.510 --> 02:19.590
Paste it here.

02:19.590 --> 02:27.310
And if you want to allow the user to, uh, like, uh, video capturing, copy it, you can add it.

02:27.350 --> 02:27.830
Okay.

02:28.150 --> 02:28.910
Click sync.

02:28.910 --> 02:31.710
Now close the previous project.

02:31.710 --> 02:35.310
And now let's add new libraries here.

02:35.350 --> 02:39.750
The permission libraries permission and navigation libraries.

02:39.750 --> 02:47.070
The permission implementation libs dot accompanist dot permissions.

02:47.070 --> 02:54.830
Also you can search Google for accompanist permission library and you get the library.

02:54.830 --> 02:56.110
So scroll down.

02:56.150 --> 03:03.820
You get the latest versions for the composer 70.37.3.

03:03.860 --> 03:04.300
Okay.

03:04.340 --> 03:12.020
Or you can simply write this a companion a companion permission 0.28.

03:12.060 --> 03:15.380
You can update it to 0.37 okay.

03:15.540 --> 03:16.500
So click sync.

03:16.500 --> 03:20.780
Now we're going to use Hilde for dependency injection.

03:20.820 --> 03:25.140
So I'm going to make it a professional and a complex application.

03:25.140 --> 03:32.900
So we're going to use dependency injection using Hilde search for Hilde navigation compose dependency.

03:33.140 --> 03:38.820
Select Android Developer website 1.3 for the Hilde.

03:38.820 --> 03:40.340
Scroll down.

03:40.380 --> 03:41.980
Let me check the dependency.

03:41.980 --> 03:43.580
Another search for Hilde.

03:43.580 --> 03:45.940
Compose dependency, not navigation.

03:45.940 --> 03:49.020
Use Hilde with other jetpack libraries.

03:49.220 --> 03:52.820
Scroll down integrating with Jetpack Compose.

03:52.820 --> 03:57.540
And here we don't need to use the cap, we need to use the KSB.

03:57.780 --> 04:02.090
Okay, so for this purpose Go and search for KSP.

04:02.130 --> 04:07.130
Go to dagger KSP dagger dev and this is the website.

04:07.170 --> 04:10.610
And here select migrate to KSP.

04:11.010 --> 04:13.290
Open it in another tab.

04:13.450 --> 04:24.570
Scroll down and copy this ID this is for the KSP and paste it where in the Kotlin build.gradle file

04:24.770 --> 04:26.090
the project level.

04:26.330 --> 04:30.050
So project level here paste it.

04:30.090 --> 04:38.010
Enable it in the build.gradle file at the build or the app level.

04:38.010 --> 04:40.170
Scroll up paste it here.

04:40.290 --> 04:44.010
Then we need to add the k not for room.

04:44.010 --> 04:47.210
We need to use the KSP with dagger.

04:47.210 --> 04:52.810
So go up you see guys the KSP here and add the KSP.

04:52.850 --> 04:54.770
This is for hilt compiler.

04:54.810 --> 04:56.570
Add the KSP down.

04:56.730 --> 05:00.960
Click sync now from dagger.dev select Tilt.

05:00.960 --> 05:06.480
And since we are using hilt with Jetpack Compose, you can go to Gradle setup.

05:06.520 --> 05:13.400
Let's add the dependency of hilt and copy this and paste it here.

05:13.440 --> 05:16.360
Make sure you make it in the correct format.

05:16.360 --> 05:26.520
I tagged about Ccpp and dagger in the previous sections, so please go back to get more info about it.

05:26.560 --> 05:33.400
We need to apply this plugin, so copy this and paste it inside the Build.gradle.

05:33.440 --> 05:36.200
At the level of the application, write the.

05:36.240 --> 05:38.400
Write it in the correct format.

05:38.400 --> 05:39.640
Sync the project.

05:39.680 --> 05:45.960
Now we need to add the dependency for hilt, so scroll down or scroll up.

05:46.160 --> 05:49.280
We need to get hilt, copy it.

05:49.320 --> 05:51.640
Copy this implementation.

05:51.640 --> 05:52.960
Paste it here.

05:53.120 --> 05:55.760
Try to sync the project and here we go.

05:55.760 --> 06:02.800
In order to ensure that there is no errors, please run the application and the.

06:02.960 --> 06:11.840
If KSB and health causes some errors, please refer to the documentations and downgrade the hilt or

06:11.880 --> 06:16.360
the Gradle or the plugins like this.

06:16.360 --> 06:23.320
So you should you see guys that here we have the accompanist permission 0.28 is causing the errors.

06:23.360 --> 06:26.480
Let me upgrade it to the latest versions.

06:26.480 --> 06:31.080
As we said before 0.37.3.

06:31.280 --> 06:32.600
So here

06:32.640 --> 06:38.520
0.37.3

06:38.680 --> 06:39.600
sync now.

06:39.600 --> 06:40.720
And here we go.

06:40.760 --> 06:42.160
Our application.

06:42.200 --> 06:49.200
Oops my fault I missed to use com dot google dot accompany okay.

06:49.240 --> 06:53.160
Also you can replace with the new catalog declaration sync.

06:53.160 --> 06:58.040
Now run the project again accompanist sync now.
