@Kevinsillo/capacitor-plugin-wallpaper
A Capacitor community plugin that enables functionality to set the device's wallpaper, supporting both the lock screen and the home screen, with options to apply the image in different modes: fit, fill, stretch, and center.
Maintainer | GitHub | Social |
---|---|---|
Kevinsillo | Kevinsillo | @Quebinaso |
First you need clone this project, install and pack it.
git clone https://github.com/Kevinsillo/capacitor-plugin-wallpaper.git
cd capacitor-plugin-wallpaper
npm install
npm run build
npm pack
Then you can install the plugin in your project.
npm install /path/to/capacitor-plugin-wallpaper-x.x.x.tgz
npx cap sync
Plugin interface for setting wallpapers.
setWallpaper(options: WallpaperOptions) => any
Sets the wallpaper.
Param | Type | Description |
---|---|---|
options |
WallpaperOptions |
The options object to configure the wallpaper. |
Returns: any
Defines the options to set the wallpaper.
Prop | Type |
---|---|
base64 |
string |
target |
WallpaperTarget |
display |
WallpaperDisplay |
Members | Value |
---|---|
HOME |
"home" |
LOCK |
"lock" |
BOTH |
"both" |
Members | Value |
---|---|
FIT |
"fit" |
FILL |
"fill" |
STRETCH |
"stretch" |
CENTER |
"center" |