# nativescript-applist

> NativeScript module to handle the list of installed apps on a device.

Latest version **2.0.1** (published 2016-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install nativescript-applist
pnpm add nativescript-applist
yarn add nativescript-applist
bun add nativescript-applist
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2016-07-26 |
| First published | 2016-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Marcel Joachim Kloubert |
| Maintainers | mkloubert |
| Keywords | NativeScript, Apps |

## Links

- npm: https://www.npmjs.com/package/nativescript-applist
- Repository: https://github.com/mkloubert/nativescript-applist
- Issues: https://github.com/mkloubert/nativescript-applist/issues
- npm.io page: https://npm.io/package/nativescript-applist

## Recent versions

- 2.0.1 (latest) — 2016-07-26
- 1.0.1 — 2016-05-15
- 1.0.0 — 2016-05-14

## README

[![npm](https://img.shields.io/npm/v/nativescript-applist.svg)](https://www.npmjs.com/package/nativescript-applist)
[![npm](https://img.shields.io/npm/dt/nativescript-applist.svg?label=npm%20downloads)](https://www.npmjs.com/package/nativescript-applist)

# NativeScript AppList

A [NativeScript](https://nativescript.org/) module to handle the list of installed apps on a device.

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SQPXGGJG3XDFY)

## License

[MIT license](https://raw.githubusercontent.com/mkloubert/nativescript-applist/master/LICENSE)

## Platforms

* Android
* iOS (currently returns empty list!)

## Installation

Run

```bash
tns plugin add nativescript-applist
```

inside your app project to install the module.

## Demo

For quick start have a look at the [demo/app/main-view-model.js](https://github.com/mkloubert/nativescript-applist/blob/master/demo/app/main-view-model.js) file of the [demo app](https://github.com/mkloubert/nativescript-applist/tree/master/demo) to learn how it works.

Otherwise ...

## Usage

### Include

Include the module in your code-behind:

```javascript
var AppList = require('nativescript-applist');
```

### Get installed apps

```javascript
AppList.getInstalledApps(function(apps) {
    for (var i = 0; i < apps.length; i++) {
        // TODO
    }
});
```

Each item of `apps` has the following properties:

| Name  | Description  |
| ----- | ----------- |
| displayName | The display name |
| icon | If available: The icon as data url |
| name | The internal (package) name |
| version.code | The version code (Android only) |
| version.name | The version name |

#### Additional options

```javascript
// get apps with icons
AppList.getInstalledApps(function(apps) {
    // TODO
}, {
    withIcons: true
});
```

The 2nd parameter of `AppList.getInstalledApps` function has the following structure:

| Name  | Description  |
| ----- | ----------- |
| icon.format | The icon format. `0` = `PNG`, `1` = `JPEG` |
| icon.quality | The icon quality between 0 and 100 |
| withIcons | Also loads icons for each entry or not |

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