Skip to content
NativeScript module to handle the list of installed apps on a device.
TypeScript JavaScript CSS Batchfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
dev
plugin
.gitignore
LICENSE
README.md

README.md

npm npm

NativeScript AppList

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

Donate

License

MIT license

Platforms

  • Android
  • iOS (currently returns empty list!)

Installation

Run

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 file of the demo app to learn how it works.

Otherwise ...

Usage

Include

Include the module in your code-behind:

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

Get installed apps

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

// 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
You can’t perform that action at this time.