Skip to content

appStateChange fired too late #479

@no-creative-name

Description

@no-creative-name

Bug Report

Plugin(s)

@capacitor/app

Capacitor Version

@capacitor/cli: 3.0.1
@capacitor/android: 3.0.1
@capacitor/core: 3.0.1
@capacitor/ios: 3.0.1

Platform(s)

Android

Current Behavior

Since for our app security/data privacy is a huge factor, we need to implement a way that the app content is hidden (white screen) when the app is backgrounded (e.g. in the task manager). For this is wanted to use the "appStateChange" event listener from @capacitor/app. The problem is that the event only fires when coming back into the app after putting it into the background. This makes it unusable for our use case.

Expected Behavior

"appStateChange" also fires before/when the app is backgrounded.

Other Technical Details

Tested on a real Android device and a simulated one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions