rn-wallpaper-manager
v1.0.4
Published
It is a library to set wallpaper to home screen.
Downloads
3
Maintainers
Readme
rn-wallpaper-manager
- A library for set wallpaper as Home Screen wallpaper
- Currently Only Supports on ANDROID Platform
Getting started
$ npm install rn-wallpaper-manager --save
Mostly automatic installation (If react-native < 0.60)
$ react-native link rn-wallpaper-manager
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNWallPaperManagerPackage;
to the imports at the top of the file - Add
new RNWallPaperManagerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':rn-wallpaper-manager' project(':rn-wallpaper-manager').projectDir = new File(rootProject.projectDir, '../node_modules/rn-wallpaper-manager/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:implementation project(':rn-wallpaper-manager')
Usage
import RNWallPaperManager from 'rn-wallpaper-manager';
// TODO: What to do with the module?
try{
await RNWallPaperManager.setAsWallpaper(Url);
} catch(err) {
// handle error here
}