# `mode.json` (https://bettips.online/mode.json)

The Flutter app reads this JSON **once at cold start** (and some screens call `RemoteModeService.load(force: true)` to refresh `mode` / `ads`).

## Fields

| Field | Type | Default if omitted | Description |
|-------|------|--------------------|-------------|
| `mode` | string | — | **Not related to ads.** `"on"` shows subscription-related UI (e.g. **Subscription** in the app menu, games webview entry on tips). `"off"` **hides** the subscription menu entry and that UI. |
| `ads` | string | `"google"` | **Only** this field controls ad networks. Ordered **waterfall**: try the first token for each placement (banner / interstitial); on load failure, try the next. |

## `ads` tokens

- `google` (aliases: `admob`) — Google Mobile Ads (AdMob).
- `meta` (aliases: `facebook`, `fan`) — Meta Audience Network (Facebook Audience Network).
- `startio` (aliases: `start`, `start.io`) — Start.io (StartApp SDK).

Separators: **`/`** or **`,`** (both are normalized the same way).

## Examples

```json
{ "mode": "off", "ads": "google" }
```

Subscription menu hidden; ads use Google (default waterfall).

```json
{ "mode": "on", "ads": "google/meta" }
```

Subscription menu visible; try AdMob first, Meta on load failure.

```json
{ "mode": "off", "ads": "meta" }
```

Subscription menu hidden; Meta-only ads (no Google app-open).

```json
{ "mode": "off", "ads": "google/meta/startio" }
```

Try AdMob, then Meta, then Start.io on load failure.

```json
{ "mode": "off", "ads": "startio" }
```

Start.io only (no Google app-open or AdMob preload).

## App configuration

Replace placeholder **Facebook App ID** and **Client Token** in:

- [android/app/src/main/res/values/strings.xml](android/app/src/main/res/values/strings.xml)
- [ios/Runner/Info.plist](ios/Runner/Info.plist)

Set real Meta **placement IDs** in [lib/utils/meta_ad_placements.dart](lib/utils/meta_ad_placements.dart): use **`androidReleaseBanner` / `androidReleaseInterstitial`** and **`iosReleaseBanner` / `iosReleaseInterstitial`** (separate iOS vs Android placements from Monetization Manager). Optional **`androidTest*Override` / `iosTest*Override`** for debug-only IDs.

Set Start.io **App IDs** from [portal.start.io](https://portal.start.io/):

- Android: [android/app/src/main/res/values/strings.xml](android/app/src/main/res/values/strings.xml) → `startio_app_id`
- iOS: [ios/Runner/Info.plist](ios/Runner/Info.plist) → `com.startapp.sdk.APPLICATION_ID`
