‫Hello, my friends.
‫We are going to create the image to text application.
‫Let's create new project inside Android Studio and we'll select the empty activity.
‫And here in the name, I will name it as image to text application.
‫We select the language as Java and minimum SDK is the lowest which is 21 lollipop.
‫Click Finish and wait for building the Gradle.
‫Data.
‫So this application will allows us to extract the text from the image that we will capture or we import
‫from the gallery.
‫First of all, let's add the dependencies for our ML kit.
‫Okay.
‫So let's go to the chrome.
‫We go to Firebase.
‫Text recognition and document documents so developers don't google.com slash m l kit slash vision,
‫slash text recognition slash android.
‫Or you can select here by the vision.
‫You can select the text recognition and select Android.
‫You can see the iOS supported languages and overview.
‫But till now we need the Android.
‫We add the implementation of this library, we go back to Android studio.
‫We add in the build gradle scripts at the model level, here we add or text recall permission.
‫Okay.
‫This is the implementation of Google dot com.
‫The Android, the apps and here is the ML text recognition.
‫Its version is 18 .0.0.
‫It's very good.
‫Now it's very simple.
‫We go back to here.
‫In your project, make sure that you include Google's MAVEN repository.
‫So if we go back to the Gretel and here that Google and repository.
‫Included successfully optional but recommended.
‫You can configure your app by using this meta data OC so you can configure your app to automatically
‫download them and model to the device after your app installed from play store till now you can put
‫it.
‫I will show you.
‫Show you.
‫Because because we are not going to publish this app on the play store.
‫You can go without this step.
‫But I will show you in case of you are publishing the apps on the play store, we copy it and we go
‫to the manifest.
‫And here inside the application tag and we go down and paste it here OC sync now and everything should
‫work fine.
‫And congratulations.
‫We have finished the adding dependencies and library step.
‫Now let's go to the main activity and start editing our layout and then we will move to the main activity
‫and start putting our codes that will work with the functions of the market.
‫So here I will drag it.
‫I will remove this text of you.
‫I will create an image few rap content, rap content and the source.
‫I will download an image for this.
‫I would copy it.
‫It's called OCR.
‫I would go to the drug labels.
‫And pasted.
‫Drobo
‫Flash OCR.
‫I will give it as an ID.
‫ID ivy logo.
‫Margin top.
‫I will give it as a 20 DPI or 40 dpi is good.
‫I will infer its constraints.
‫Like this.
‫30.
‫Good.
‫This is the image view.
‫Then we will add the text of u rap content.
‫Rap content and the text.
‫Welcome to Image to text.
‫This is the text I will drag and drop it.
‫I will infer its constraints.
‫And here we go.
‫I will add the size of this text.
‫I would name it as make it as 32 SB.
‫Or 24 is good to make it one line.
‫Now I need to make the button.
‫Rap content.
‫I will give it an ID as RN and the text inside this will name it as.
‫Start scanning.
‫And I will drag it the same way.
‫I will infer the constraints.
‫I will remove this.
‫And I will add the constraint under.
‫This.
‫So this is our main activity layout.
‫I will change the background of this to let me see the purple.
‫Let me see another color.
‫Let me see the teal.
‫700 and still 700 is inside the colors.
‫And this is the code of this.
‫Color.
‫I will make the Cutler text Cutler to write.
‫And here we go.
‫This is our application.
‫This is our main activity.
‫Inside the main activity.
‫Later on, I will add the code to allow the main activity.
‫When the user click on this, start scanning button, take him into another layout, so and another
‫activity.
‫So let's create this.
‫Another activity.
‫Create an activity here.
‫I will name it.
‫I will choose it as empty activity and I will name it as activity.
‫Underscore scanner.
‫Okay.
‫And waiting for the griddle to.