Skip to content

Capacitor plugin to set the device's wallpaper for both lock and home screens with multiple image modes

License

Notifications You must be signed in to change notification settings

Kevinsillo/capacitor-plugin-wallpaper

Repository files navigation


Wallpaper

@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.


Maintainers

Maintainer GitHub Social
Kevinsillo Kevinsillo @Quebinaso

Install

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

API

Plugin interface for setting wallpapers.

setWallpaper(...)

setWallpaper(options: WallpaperOptions) => any

Sets the wallpaper.

Param Type Description
options WallpaperOptions The options object to configure the wallpaper.

Returns: any


Interfaces

WallpaperOptions

Defines the options to set the wallpaper.

Prop Type
base64 string
target WallpaperTarget
display WallpaperDisplay

Enums

WallpaperTarget

Members Value
HOME "home"
LOCK "lock"
BOTH "both"

WallpaperDisplay

Members Value
FIT "fit"
FILL "fill"
STRETCH "stretch"
CENTER "center"

About

Capacitor plugin to set the device's wallpaper for both lock and home screens with multiple image modes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published