Skip to content

Android RecreationAttempt on Activity reopen  #3325

@SnowyCoder

Description

@SnowyCoder

When an android app calls event_loop.exit() the application exits, but if the application is opened again without closing it in the "recent apps" the EventLoop creation will fail with a RecreationAttempt error.

Steps to reproduce

Reported error

called `Result::unwrap()` on an `Err` value: RecreationAttempt

Repo explaination

The repo linked in the "Steps to reproduce" section is a modified version of the one linked in the README android section.
I just updated the dependencies and linked BrowserBack to event_loop.exit() (that sems to be the logical key invoked when the android back button is pressed).

Comment

The general problem seems to be that android_main can be called more than once without unloading and reloading the native library (ex. if we use an application with two interacting activities, say LoginActivity and GameActivity).

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - androidAffects the Android backend

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions