Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

[Android] Client was already initialized error #40

@haakandev

Description

@haakandev

Describe the bug
I believe there's an issue when the App Context is alive but Activity Context has been destroyed (difference on Android explained here). As the JS side is trying to initialize/configure the LD client along with the UI, this seems to cause a conflict. My guess is that the client is still around within the Application Context?
The font change in the reproduction steps below is intended as a short-cut to destroy the UI/Activity Context.

This is somewhat related to #10, but here an actual issue rather than a 'nice to have' I think.

To reproduce

  1. Download & set up the hello world project as described: https://github.com/launchdarkly/hello-react-native
  2. Run on Android (I've been using emulator)
  3. With the app running on the device/emulator, navigate to device Settings > Display > Font size
  4. Change the font size
  5. Return to the hello world app

Expected behavior
The app to be able to re-create the activity context.

SDK version
2.2.0

Language version, developer tools
React Native 0.61.2

OS/platform
Android 9

Screenshot
Screenshot_1581987723

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions