0.0.2 • Published 6 years ago

cordova-plugin-wputils v0.0.2

Weekly downloads
5
License
GPL-3.0
Repository
github
Last release
6 years ago

Cordova Plugin Wallpaper - WPUtils

NPM Repository

This is a simple plugin that exposes 3 methods exclusively for android, for you to set home and/or lock screen wallpaper.

Usage

Add the plugin. I have named it WPUtils, standing for wallpaper utils.

cordova plugin add cordova-plugin-wputils.

Use the global variable WPUtils to set:

  • WPUtils.setImageAsWallpaper(url, successFunction, errorFunction);
  • WPUtils.setImageAsLockScreen(url, successFunction, errorFunction);
  • WPUtils.setImageAsWallpaperAndLockScreen(url, successFunction, errorFunction);

Where the url, is the link to the image that you want to set as wallpaper, successFunction and errorFunction are the functions to run on succes or error.


LICENSE - GPL-3.0 - André Varandas