There are 2 activations. In one activity, the first user enters the values ​​and transfers them to the main activity via onActivityResult and simultaneously saves them to Firebase. The user who is in the main activation does not see the data until the first user exits the second activation into the main one. How to record data automatically without closing the first activation?

  • The question is not very clear. More precisely, it is not clear what is happening and why different users on different activations. Maybe they are on different devices? Maybe you need to write data not at the time of exit, but at another time, for example, by clicking? Or do you expect that there will be several activations at the same time? If the latter - then it does not work - android does not work. - Yuriy SPb
  • Most likely I understood what the error was. The onAtivityResult method works only after exiting the second activation. Therefore, I have the data downloaded from the database only. How can it be done differently? - Danil Filippov
  • It is still not clear what and in what order you do. Try to reformulate the question - YuriySPb
  • There is an application for 8 people. Each user has his own activation in which they enter data into the edittext and use the "save" button to save the data to the firebase. All data from the activation is transferred to the main activation. But the problem is that the data in the main activation get only when the user enters the data, out of their activites. Although the values ​​in the main activation, I tied to the firebase. - Danil Filippov
  • one
    As long as any other activations on the screen are activated, they should be considered dead. Those. You can not manipulate them from other activites. Those. your problem is standard and expected behavior. Write what you want to change here and why - maybe you are not looking at the problem from that angle? Maybe you just need the data not to be stored / received / updated in the activit, but in some global singleton? In general, it is still not entirely clear why updating data when returning from activation is a problem. - Yuriy SPb

0