react-native-save-photo

1.0.2 • Public • Published

react-native-save-photo

Getting started

$ npm install react-native-save-photo --save

Mostly automatic installation

$ react-native link react-native-save-photo

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-save-photo and add TMSavePhoto.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libTMSavePhoto.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

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

Usage

import StoragePhoto from 'react-native-save-photo';
 
// TODO: What to do with the module?
StoragePhoto.savePhoto('http://pic11.nipic.com/20101117/3320946_134344218000_2.jpg', (message) => {
    console.log(message);
});

Package Sidebar

Install

npm i react-native-save-photo

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

8.26 MB

Total Files

974

Last publish

Collaborators

  • zhangguozhong