Skip to content

kaushalmarakana/rn-wallpaper-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rn-wallpaper-manager

  1. A library for set wallpaper as Home Screen wallpaper
  2. 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

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.reactlibrary.RNWallPaperManagerPackage; to the imports at the top of the file
  • Add new RNWallPaperManagerPackage() to the list returned by the getPackages() method
  1. 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')
    
  2. 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
}

About

A library for set wallpaper as Home Screen wallpaper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published