Hey there.
So let's continue the implementation of our content provider.
We have created methods that we need to override the crowd methods and also to get type method.
We have already added in the create method the creation of the Olympus the build helper help and we
need to create another object an object all the urine match a class.
We agreed that we will use this your right to work with the entire members table and for working with
a separate line.
We will use the array of these form this guy.
We will put here after the slash the idea of our role in the table and with different types of your
eyes.
Our methods should behave differently and this is exactly what what you are I imagine ourselves.
How does your hour much work your major matches an integer and you are right.
And that is why we must create a separate code for each type of what you are for these two types.
That is for your eye that will work with a separate or for example we will create some kind of code
called One for example and for your right that will work with the whole table called to.
For example these numbers can be any integers here maybe 3 1 3 2 or 2 to 1.
It doesn't matter.
The main thing is that they are unique by these numbers.
There you are a match.
Finds out which way to work and that is it works either with a separate line or with the whole table.
Also your match can determine when we enter and incorrect.
You are right.
That is when we type something with a typo.
Then these you or I will not be matched with any quote and the your am sure we will determine that it
is an incorrect.
You are right and therefore will not do anything.
Well let's go to the Android developers site creating a content provider.
Let's open it.
And on this page you describe it as describe how to create a content provider and also describes how
to create your I imagine.
Here in this code The following is written.
First we need to create a your match or object.
Let's copy this code.
And paste into our content provider
will cause the list so that it is better visible.
Next we need to add these two entries.
Here we add to the your I imagine your I add your right Richard to match.
In this case where they are right for the entire table and in this case after the slash and the hash
tag side we add that you are right to work with one or all.
What does this hash tag mean a hash tag.
A so-called wild card.
That is a false symbol.
Instead of this character we can substitute any integer that we will be used as the table or I.D. that
is.
This is generalized and to generalize writing for working with a table within a row.
We cannot specify a specific number one or two here because if we want to work with another line one
for five thirty eight then this year I will not match.
Therefore this wild card the so-called is used here.
The hash tag character and the hash tag the notes are the same thing that we work with a string by.
Let's add this to our code.
We need to write this in a static block as you can see in a static blog.
The code is executed before the creation of an object of a class.
That is we will not need to create a content provider object in order for this court to work.
So let's create a static blog here.
Write static specify curly braces as specify your match.
Add your right next we need to specify authority and we can access to our authority using our constant
notice.
We specify the class name Olympus club Olympus contract authority.
We write collab Olympus contact DOT authority.
Next we have the second parameter.
Specific pad to either the entire table or the role of the table.
We also have such a constant.
We created the previously bathroom members and that is here.
We again specify go up Olympus contract that bath members
karma and then we must specify the code.
As I've told you these can be any integer.
Let's get 3 1 1 1 1 for example to match that you all write the code for working with the entire table
table and a copy.
This line.
And now we will add that you are right for working with one or all to do this.
We need to specify.
And now with a slash take a code and hash tag update.
We can simply concatenate plus slash and hash tag and of course we will specify a different code.
Let's specify to 2 2 for working with one line that is we will have only to your eyes for working with
one line and for working with the whole table.
And of course we can add constants to our code.
So again to prevent a mistake when writing the code it's better to use the constants.
So let's create two constants 1 1 1 and 2 2 2.
Let's write them.
Private static final int the first we will call members for work week.
Whole table.
Assign the value 1 1 1 copy.
And the second will call member I.D. 2 2 2
and now we
get access by name of Constance members and member I.D.
So let's once again make sure that our application is arriving after we add the code so that it's easier
to find a mistake.
Well it works without any changes.
So continue to work in the following.
We do.