App paused and app stop bug


(Philipp Lang) #1

Hello i use the blocks when app stops , when app resum and when app paused for online status. If i use the gallerie picker booth blocks are do her job. The app stop and paused in the same momeent. This cannot be right if i go into gallerie picker or take the cam booth blocks do their job and make online user minus 1. But all booth do that so you have miinus 2. If you take you picture or made the picture the block when app resume do their job and add plus 1 to the online users. It works only if i delete when app pause block. But so you have this feature less.Is this a bug or normal?


#2

Try to learn the lifecycle:


(Philipp Lang) #3

thanks for this picture this helps, i work like this and this works but i i put in when app pause than you have minus 2. If i understand that picture right, will the block, when app pause each time work with when app stop when you go into the camera or the image picker , or if you put the app in the background. But if we have booth of this blocks, why do we have them bc all two blocks go to work if you leave the app in a way like i told above. What is the different, when will only the block when ap pause work and when the other one. Bc in all my tries, booth blocks did their jobs. Can someone explain me when it is good to use the pause block and when to use the on stop block,


#4

Use just one of the events. And not the two together.
As example only resume and pause


(Pablo A. Rod.) #5

I have the same difficulty to understand here. In theory Mika explained the diference, but I am not sure. If someone could correct me on my analysis I would be grateful:

  1. When app stops it can be killed by Android system, but when it is paused that is not possible.

  2. The app process will be killed only if the system is out of memory.

  3. If the app stop it will restart from the start point, as if the user was opening it for the first time.

Example: If it is a video player app, it will restart from the beginning of the video if app was stopped but may resume from where the user was watching if it is paused.

Is my analysis correct?

If so, what is the diference between the app restart after it was killed by the system or no? It will open faster in the second case?


(Marlon Rodríguez) #6

Which block creates an Update event where each frame is executed?

You can put invisible objects, arrangements, when the app is in the background. When you regain access, reposition those objects.

You can create a local database where you keep the place where you left the player.


(Pablo A. Rod.) #7

You can create a local database where you keep the place where you left the player.

That was my idea when I saw Mika explanation.

Which block creates an Update event where each frame is executed?

almeidapablo:

The block on app resume, it is just between the pause and stop blocks:
image