uri.getPathSegments().get(1);
Basically the get(1)
part
In Maths, an injective function or injection or one-one function is a function that comprises individuality that never maps discrete elements of its domain to the equivalent element of its codomain. We can say, every element of the codomain is the image of only one element of its domain.
One to one function is a special function that maps every element of the range to exactly one element of its domain i.e, the outputs never repeat. As an example, the function g(x) = x - 4 is a one to one function since it produces a different answer for every input.
A function f is 1 -to- 1 if no two elements in the domain of f correspond to the same element in the range of f . In other words, each x in the domain has exactly one image in the range.
The horizontal line test can be used to determine if a function is one-to-one given a graph. Simply superimpose a horizontal line onto a graph and see if it intersects the graph at more than one point. If it does, the graph is not one-to-one and if it only intersects at one point, it will be one-to-one.
That will return you the path segment with index '1'.
By that, I mean, If you have content://com.myapp/first/second/third/
It will return 'second'.
get(2) will return 'third'
and so on...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With