0.1.3 • Published 2 years ago

@codeooze/react-native-wallpaper-manager v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@codeooze/react-native-wallpaper-manager

React native wallpaper manager

Note: This package is only for android.

Installation

npm install @codeooze/react-native-wallpaper-manager

React Native 0.59 and below

Run npx react-native link @codeooze/react-native-wallpaper-manager to link the library.

Usage

import *as React from 'react';
import { applyWallpaper } from '@codeooze/react-native-wallpaper-manager';

const App = () => {

  // ...
  
  const setWallpaper = (uri, screen) => {
  
    //uri = "https://i.pinimg.com/originals/76/5e/1d/765e1dc8cb1cc115fb3b0b39a895fdeb.jpg"
    //screen = "home" || "lock" || "both"

    applyWallpaper(uri, screen)
      .then((response) => { Alert.alert(response) })
      .catch((error) => { Alert.alert(error.message) })

  }
  
  // ...
  
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Buy me a coffee