Skip to content

Latest commit

 

History

History
127 lines (92 loc) · 3.99 KB

README.md

File metadata and controls

127 lines (92 loc) · 3.99 KB


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"