# android-versions

> Get the name, API level, version level, or version code from any version of Android.

Latest version **2.2.1** (published 2026-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install android-versions
pnpm add android-versions
yarn add android-versions
bun add android-versions
```

## Health

**Score 63/100 (C)** — status: active.

Positive: has types package; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2026-08-12 |
| First published | 2016-08-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/android-versions) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | dvoiss |
| Maintainers | dvoiss |
| Keywords | android, version, versions, nougat, marshmallow, api, level |

## Links

- npm: https://www.npmjs.com/package/android-versions
- Repository: https://github.com/dvoiss/android-versions
- Homepage: https://github.com/dvoiss/android-versions#readme
- Issues: https://github.com/dvoiss/android-versions/issues
- npm.io page: https://npm.io/package/android-versions

## Dependencies (1)

- [semver](https://npm.io/package/semver.md) ^7.5.2

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.2.1 (latest) — 2026-08-12
- 2.2.0 — 2026-07-09
- 2.1.2 — 2026-06-30
- 2.1.1 — 2026-02-19
- 2.1.0 — 2025-02-16
- 2.0.0 — 2024-01-06
- 1.9.0 — 2024-01-06
- 1.8.2 — 2023-06-25
- 1.8.1 — 2022-11-16
- 1.8.0 — 2022-08-23
- 1.7.0 — 2021-05-17
- 1.6.0 — 2020-09-27
- 1.5.0 — 2019-09-21
- 1.4.0 — 2018-10-23
- 1.3.0 — 2018-01-23
- … 6 more at https://npm.io/package/android-versions/versions

## README

Android Versions
================

A node module to get Android versions by API level, semantic version, or version name.

Versions are referenced from [source.android.com/docs/setup/reference/build-numbers](https://source.android.com/docs/setup/reference/build-numbers#platform-code-names-versions-api-levels-and-ndk-releases). The version for "Current Development Build" (`"CUR_DEVELOPMENT"`) is not included in the list of `VERSIONS`.

Release dates are referenced from [https://en.wikipedia.org/wiki/Android_version_history](https://en.wikipedia.org/wiki/Android_version_history).

[![NPM version][npm-image]][npm-url]
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/dvoiss/android-versions/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/dvoiss/android-versions/tree/master)

[npm-image]: https://img.shields.io/npm/v/android-versions.svg?style=flat-square
[npm-url]: https://npmjs.org/package/android-versions

## Install

```bash
# NPM
npm install android-versions --save
# YARN
yarn add android-versions
```

## Usage

View the tests for more advanced usage.

```javascript
const android = require('android-versions')
```

#### Get by API level:

```javascript
console.log(android.get(23))

=> { api: 23, semver: "6.0", name: "Marshmallow", versionCode: "M" }
```

#### Get by version:

```javascript
console.log(android.get("2.3.3"))

=> { api: 10, semver: "2.3.3", name: "Gingerbread", versionCode: "GINGERBREAD_MR1" }
```

#### Get all by predicate:

```
android.getAll((version) => {
  return version.api >= 12 && version.api < 15
}).map((version) => version.versionCode)

=> [ "HONEYCOMB_MR1", "HONEYCOMB_MR2", "ICE_CREAM_SANDWICH" ]
```

#### Access a specific version with all info:

```
android.LOLLIPOP

=> { api: 21, semver: "5.0", name: "Lollipop", versionCode: "LOLLIPOP" }
```

#### Access the complete reference of Android versions with all info:

```javascript
android.VERSIONS

=> {
  BASE:    { api: 1,  semver: "1.0", name: "(no code name)", versionCode: "BASE", releaseDate: "23 Sep 2008" },
  ...
  N:       { api: 24, semver: "7.0", name: "Nougat",         versionCode: "N",    releaseDate: "22 Aug 2016" }
  ...
}
```

## Test

```bash
npm run test
```

## License

MIT

---
_Source: https://npm.io/package/android-versions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
