Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile/app: lifecycle events not firing correctly #13207

Open
BrianCraig opened this issue Nov 11, 2015 · 3 comments
Open

x/mobile/app: lifecycle events not firing correctly #13207

BrianCraig opened this issue Nov 11, 2015 · 3 comments
Labels
mobile Android, iOS, and x/mobile
Milestone

Comments

@BrianCraig
Copy link

Hi ! Im having some issues related to lifecycle event. The problem is that, i want to know when an App wants to Quit, but i don't get the corrects events

the gist is here : https://gist.github.com/BrianCraig/bb2bb411a202b35c1a88

First, im gonna run it on my PC (x86 AMD - default linux mint 17 Quiana cinnamon distro)

start the process

StageDead none
StageAlive on
StageVisible on
StageFocused on

this is a correct event, which says that the stage is created (alive), visible, and focused

paint internal

now this paint is internal, but, it should be external; there is not a single paint event sent in my code

minimizes window

nothing happens

close button window

nothing happens

log out session

nothing happens

Then, im gonna run it on my phone (Android 4.4.2 - Moto E first gen)

start the process

StageDead none
StageAlive on
StageVisible on
StageFocused on

this is a correct event, same for pc

paint external

correct context

minimizes app

StageDead none
StageAlive none
StageVisible off
StageFocused off

correct event

opens view

StageDead none
StageAlive none
StageVisible on
StageFocused on

correct event

minimizes app again

StageDead none
StageAlive none
StageVisible off
StageFocused off

correct event

closes the app

nothing

So, is this working right ?

@BrianCraig BrianCraig changed the title x/mobile: x/mobile: lifecycle events not firing correctly Nov 11, 2015
@BrianCraig
Copy link
Author

Update:

Here https://github.com/golang/mobile/blob/master/app/android.go i found that, for android, there are binded events like onStart() onStop() onPause() and onResume() that are not triggering anything;For example, i imagine that onStop() should trigger a StageAlive off event.

@rakyll rakyll changed the title x/mobile: lifecycle events not firing correctly x/mobile/app: lifecycle events not firing correctly Nov 11, 2015
@rakyll
Copy link
Contributor

rakyll commented Nov 11, 2015

/cc @crawshaw

@db47h
Copy link

db47h commented Nov 12, 2015

For the X11 part, there is no lifecycle event received on close because of issue #12828. This probably applies to session log out too. Minimize is also not handled at all right now.

@hyangah hyangah added this to the Unreleased milestone Dec 1, 2015
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

5 participants