Hey there.
Well alerts finally begin to create a content provider.
And in our packaged data where all the information about the database contained.
We will create another Java class and call it Olympus content provider
and then we inherit it for all the content provider class and understood it immediately underlined because
we need implement methods and we need to implement all the methods that are immediately emphasized Dave
and Android X exploitation is automatically added We don't need them.
So let's get rid of them.
And so we have for crud methods here.
Create a read update and delete create is our Insert method.
Read is the query method update is the update method and delete is the delete method of the same name.
And there is also the get type method that's moved so that it is below the current methods
so we created the class and now we need to go into our manifest and manifest and add the provider here
to so after activity we need to specify tag provider Authority property with this property.
You can identify the provider.
We will talk about this property later and we usually use the name of the package for each for it.
Copy it here and paste 18 and just let's remove data so that the general package general for all classes
this one name we specify the name of all class and before the name we will also specify the name of
the package data that is copied the name of the class here dot data and automatically we get all inputs
content provider.
And while more property that we can use exported that is is our provider reasonable available for all
applications.
Well now let's set it to false.
It will be unavailable.
Of course the attack.
And now we need to and don't create method.
Which was also created.
Now we need to create our DB help our class which we created more precisely its object Olympus VB helper.
That is let's create in the class a class field
Olympus to be opened up.
Let's call it the Be Open helper.
This field and here in the on create method we initialize it.
That is we will do the following DBA open helper to assign new Olympus the be open helper.
And here we need to parse the context that is.
We can do this using the get context method and we must return the true.
That's around the app and see that everything works as before correctly.
After adding a new code
and so everything works correctly nothing is broken and we can continue to develop the application.