There is an application that when you first start to download some data. With the next launches it is necessary that not the first activation be opened, but another. How can this be implemented correctly?

Only a redirect when booting from the first activation to the one you need via intent comes to mind, but it is probably the same crutch.

  • Do you need to activate data (user interaction) to download the data, or do they just come from somewhere? - pavlofff
  • @pavlofff via asynctask is collected from the server. The user is required to press the button in the first activation, he will transfer it to the second, where the data will be downloaded and used later - whalemare

2 answers 2

To solve your problem, it is logical to use one activite and two fragments, depending on the condition that we check in activation ( first launch or not ), then display one of the fragments - the first gives permission to receive data, the second works with this data.

  • Thank you, good advice - whalemare

As an option, in the first activation in the onCreate () method, you need to make the check you need, and according to the condition, immediately switch to another one. Since I am afraid of what to ask where in the manifesto another activation is not possible to enter

  • Right now I’m doing this, but it seems to me that this is not quite right - whalemare