Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions test-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ launchdarkly.environment=production

Set `launchdarkly.environment=staging` to use LaunchDarkly's staging endpoints.

## Two environments

Add a second key to start a second environment alongside the first, from the same `LDConfig`
through `secondaryMobileKeys`:

```properties
launchdarkly.secondaryMobileKey=mob-...
```

An **Env** spinner then appears next to **Persistence**, and chooses which environment's client the
buttons use: the evaluations, **Track**, the kill, crash, over-refresh and fill-batches buttons,
**Post 20 MB**, the connection status and the event storage view, which shows that environment's own
directory. The choice is saved, so the launch that answers a kill button shows the same environment.

**Flush**, **Offline**, **Identify** and the restart a persistence change makes reach both
environments whichever is selected, because the SDK applies `flush`, `setOffline`, `setOnline`,
`identify` and `close` to every environment it started.

## Event-loss scenarios

Create a boolean flag named `kill-flag`, or enter another flag key in the app. Tap
Expand Down
2 changes: 2 additions & 0 deletions test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ android {

buildConfigField("String", "MOBILE_KEY",
"\"${localProperties.getProperty('launchdarkly.mobileKey', '')}\"")
buildConfigField("String", "SECONDARY_MOBILE_KEY",
"\"${localProperties.getProperty('launchdarkly.secondaryMobileKey', '')}\"")
buildConfigField("String", "LD_ENVIRONMENT",
"\"${localProperties.getProperty('launchdarkly.environment', 'production')}\"")
}
Expand Down
Loading
Loading