The Intent class documentation says that its method getIntent () is deprecated and instead it is recommended to use parseUri()
. In turn, in the section of parseUri()
it is said that the URI (its parameter) can be returned from toUri()
.
So, what I've been trying is to start a second activity. In the second activity I try to recover the intent with parseUri()
passing as a parameter the String I got from toUri()
in the activity (seen by console), but I can not get it to work.
Someone can show me the correct way to use these methods. I mean, for example, assign the URI returned by toUri()
to a static public constant that can then be accessed from another class to retrieve the intent using parseUri()
.
If the question was not understood, please see this example .
Ctrl + F to find getIntent () (only appears once). That is what I want to achieve. But instead of getIntent()
, use parseUri()
and toUri()
.