Home>

For some reason, the same Android activity can be created multiple times.
As a temporary measure, when the normal process is completed, finish () is called to delete itself and move to a new screen, but even if that action is taken, the same activity may be performed several times.

I'm suspicious when onDataChange of reference !!. addValueEventListener is called, but since the screen disappears every time I call finish () at the end of onDataChange, it seems that a new screen will not always be created when onDataChange occurs.

I do not understand the meaning.

  • Answer # 1

    The activity that I thought I finished and erased moved and called startActivity.

  • Answer # 2

    As morisakisan said, it seems to have detected multiple taps.
    As in the article below, why not try an implementation that ignores subsequent taps for 0.5 seconds if there is a tap.

    Double push prevention measures on Android