The essence of the problem is as follows: you cannot go to some activations without logging in. And if there is no authorization data, then a transition to activation with authorization is performed. And how, after logging in, go to the activitization that you originally planned to switch to?

    1 answer 1

    And who prevents to transfer in intent as one from parameters actually a name of the necessary activit (or number)? I.e. Check whether you need to do authorization. If not, then we simply call a certain function that creates activations by number / name. If not, then we activate the authorization and give it the same number. Having performed all authorization, it can call the same function again, passing parameters to it.

    Method two. You can use the activation stack. Each activation at its start checks whether it needs authorization. If so, it starts activating authorization. After the activation of authorization is closed, the system will return us to the previous activation. It needs to check the authorization again. In this scheme, the main thing is not to forget to process the option when the user refused to authorize, otherwise there will be a vicious circle.

    • I also came to the first version, I am implementing it now. But the second I did not understand - makavelka
    • Read this article on Habré: Tasks and Back Stack in Android . Should clear up. - KoVadim 2:21 pm