https://github.com/nick-denry/cordova-plugin-intent-list
Cordova/phonegap plugin to get Android installed applications with icons
https://github.com/nick-denry/cordova-plugin-intent-list
android applications cordova-plugin icons intent list phonegap-plugin
Last synced: 5 months ago
JSON representation
Cordova/phonegap plugin to get Android installed applications with icons
- Host: GitHub
- URL: https://github.com/nick-denry/cordova-plugin-intent-list
- Owner: nick-denry
- License: apache-2.0
- Created: 2019-04-02T00:12:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-29T22:01:03.000Z (over 5 years ago)
- Last Synced: 2024-11-07T09:53:29.571Z (6 months ago)
- Topics: android, applications, cordova-plugin, icons, intent, list, phonegap-plugin
- Language: Java
- Size: 30.3 KB
- Stars: 8
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple phonegap plugin to get Android installed apps with base64 icons


[](https://github.com/jnick-denry/cordova-plugin-intent-list)

![]()
Demo.
## 1. Installation
cordova plugin add cordova-plugin-intent-list
or directly via git (unstable)
cordova plugin add https://github.com/nick-denry/cordova-plugin-intent-list
## 2. Usage
```js
navigator.IntentList.getList(success, error);
``````js
navigator.IntentList.getList(function(applist) {
console.log(applist);
}, function(errorMesssage) {
console.log(errorMesage);
});
````applist` will contain array of JSON objects.
```json
[
{
"label": "Chrome",
"package": "com.android.chrome",
"packageIcon": "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAYAAADnRuK4AAAABHNCSVQICAgIfAhkiAAAIABJREF..."
},
...
]```
## 3. Update Content Security Policy
Add `img-src 'self' data:;` to your CSP declaration to allow `data:image` images, i.e.:
```html```
⚠️ __NOTE__ Do not use wide open CSP declaration in production. @see https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/#content-security-policy## 4. Credits
- [Nick Denry](https://github.com/nick-denry)
- [All Contributors](../../contributors)## 5. License
Licensed under Apache 2.0. Please see [License File](LICENSE) for more information.