# `Mob.Device.Android`
[🔗](https://github.com/genericjam/mob/blob/master/lib/mob/device/android.ex#L1)

Android-specific device events. Symmetrical with `Mob.Device.IOS`.

Messages are tagged `:mob_device_android`:

    {:mob_device_android, event}
    {:mob_device_android, event, payload}

## Subscribe

    Mob.Device.Android.subscribe()

## Status

Android event surfacing is **pending implementation**. The Elixir API is
stable; subscribing succeeds but no events fire until
`ProcessLifecycleObserver` and `ComponentCallbacks2` are wired up in the
generated app's Java/Kotlin side. Tracked in `PLAN.md` under "Native event
surface — Batch 1".

## Planned events

- `:doze_mode_changed` — Doze mode entered/exited (no iOS counterpart)
- `:idle_mode_changed` — light idle mode (`ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED`)
- `:trim_memory` with level — `ComponentCallbacks2.onTrimMemory(level)`
- `:airplane_mode_changed` — `ACTION_AIRPLANE_MODE_CHANGED`
- `:user_present` — `ACTION_USER_PRESENT` (device unlocked)
- all cross-platform `Mob.Device` events re-emitted under this tag too

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

# `subscribe`

```elixir
@spec subscribe() :: :ok
```

Subscribe the calling process to Android-specific device events.

# `unsubscribe`

```elixir
@spec unsubscribe() :: :ok
```

Unsubscribe the calling process.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
