rnwallpaper

1.2.1 • Public • Published

RNWallpaper

Getting started

$ npm install rnwallpaper --save

Mostly automatic installation

$ react-native link rnwallpaper

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import sonu.malik.wallpaper.RNWallpaperPackage; to the imports at the top of the file
  • Add new RNWallpaperPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':rnwallpaper'
    project(':rnwallpaper').projectDir = new File(rootProject.projectDir, 	'../node_modules/rnwallpaper/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':rnwallpaper')
    

Usage

import Wallpaper from 'rnwallpaper';
 
Wallpaper.setWallpaper('http://yourwebsite.com/anyImage.png', (res) => Alert.alert("Response: ", JSON.stringify(res)))
 
Wallpaper.openImage('content://media/external/images/media/Y')

Package Sidebar

Install

npm i rnwallpaper

Weekly Downloads

1

Version

1.2.1

License

ISC

Unpacked Size

1.89 MB

Total Files

386

Last publish

Collaborators

  • iamsonumalik