Hello,
I'm having problem with controlling the activities.
Via a service, upon receiving a notification of a new email, a transparent 'popup' activity is shown if the 'Main' activity isnt in the foreground, even if Main was never started..... Its working great.
If the Main was run and Back button pressed so its not in foreground and not in background, the popup will again be shown as it should be.......so working great.
These two are done with having a global flag and checked in the service if Main is running,..... this flag is correctly set true/false in the right places, (on startup, pause, back, resume etc, checked with logs)
If (and the problem) Main was run and then HOME key pressed so its not showing but paused in background, upon a new notification BOTH Main and popup activities are incorrectly shown when it should be only popup as the above two scenarios.
Even though the running flag is set to false when Main when Home key is pressed, (checked for UserClosed also) it still shows as well as the popup??? After closing Main with Back key it again works as it should?
I checked for 'IsPaused' but still problem persists..?
I'm having problem with controlling the activities.
Via a service, upon receiving a notification of a new email, a transparent 'popup' activity is shown if the 'Main' activity isnt in the foreground, even if Main was never started..... Its working great.
If the Main was run and Back button pressed so its not in foreground and not in background, the popup will again be shown as it should be.......so working great.
These two are done with having a global flag and checked in the service if Main is running,..... this flag is correctly set true/false in the right places, (on startup, pause, back, resume etc, checked with logs)
If (and the problem) Main was run and then HOME key pressed so its not showing but paused in background, upon a new notification BOTH Main and popup activities are incorrectly shown when it should be only popup as the above two scenarios.
Even though the running flag is set to false when Main when Home key is pressed, (checked for UserClosed also) it still shows as well as the popup??? After closing Main with Back key it again works as it should?
I checked for 'IsPaused' but still problem persists..?