open-index/open-npm huggingface dataset:
npm package: @1ziton/react-native-baidulocation
Description: 百度定位
Latest version: 1.0.1

﻿
# @1ziton/react-native-baidulocation
# 百度定位
## Getting started

`$ npm install @1ziton/react-native-baidulocation --save`

### Mostly automatic installation

`$ react-native link @1ziton/react-native-baidulocation`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-baidulocation` and add `RNbaidulocation.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNbaidulocation.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MainApplication.java`
  - Add `import com.dashixiong.baidulocation.LocationReactPackage;` to the imports at the top of the file
  - Add `new LocationReactPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':@1ziton_react-native-baidulocation'
    project(':@1ziton_react-native-baidulocation').projectDir = new File(rootProject.projectDir, 	'../node_modules/@1ziton/react-native-baidulocation/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      implementation project(':@1ziton_react-native-baidulocation')
      1.在主项目的build.gradle 配置key
          defaultConfig {
        manifestPlaceholders = [
                BAIDU_APPKEY:'yourkey'
        ]

    }
    2.在主项目的AndroidManifest.xml配置
          <meta-data
        android:name="com.baidu.lbsapi.API_KEY"
        android:value="${BAIDU_APPKEY}" />
  	```



## Usage
```javascript
import {
  NativeModules
} from 'react-native';
const { LocationModule } = NativeModules;

      componentDidMount() {
    if (Platform.OS === ANDROID) {
      LocationModule.locationNow();
    }
  }

    LocationModule.getLocation()
        .then((result) => {
          const locationData = JSON.parse(result);
          if (locationData.errorCode === 0) {
            let { longitude, latitude } = locationData;
          } else ToastUtil.center('定位失败，请重试');
        })
        .catch(() => {
          ToastUtil.center('定位失败，请重试');
        });
    }
```

```
npm package: @1ziton/react-native-bdidentifi
Description: `$ npm install @1ziton/react-native-bdidentifi --save`
Latest version: 1.1.0

﻿
# react-native-1ziton-bdidentifi
# 百度银行卡号码识别组件
## Getting started

`$ npm install @1ziton/react-native-bdidentifi --save`

### Mostly automatic installation

`$ react-native link @1ziton/react-native-bdidentifi`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-bdidentifi` and add `RNBdidentifi.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNBdidentifi.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

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


## Usage
```javascript
import {
  NativeModules
} from 'react-native';
const { BankPhoto } = NativeModules;
```
     if (Platform.OS === 'android') {
      BankPhoto.regist('yourak', 'yoursk');
      BankPhoto.photo()
        .then((result) => {
          const bankEntity = JSON.parse(result);
          this.setState({
            bankCode: bankEntity.BankCardNumber,//银行卡号
            bankName: bankEntity.BankName,//银行卡名称
            bankLineNum: bankEntity.BankCardType//银行行号
          });
        })
        .catch((error) => {
          this.setState({
            result: JSON.parse(error)
          });
        });
    } 
```
npm package: @1ziton/react-native-photo-picker
Description: ## Getting started
Latest version: 1.0.10


# react-native-photo-picker

## Getting started

`$ npm install @1ziton/react-native-photo-picker --save`

### Mostly automatic installation

`$ react-native link @1ziton/react-native-photo-picker`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-photo-picker` and add `RNYizhitongPhotoPicker.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNYizhitongPhotoPicker.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MyApplication.java`
  - Add `import com.dashixiong.camera.CameraPackage;;` to the imports at the top of the file
  - Add `new CameraPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
	include ':@1ziton_react-native-photo-picker'
	project(':@1ziton_react-native-photo-picker').projectDir = new File(rootProject.projectDir, '../node_modules/@1ziton/react-native-photo-picker/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
        implementation project(':@1ziton_react-native-photo-picker')
  	```


## Usage
```javascript
import CameraMoudle from '@1ziton/react-native-photo-picker';

// 注册百度云参数
	CameraMoudle.regiestWithBucketUrl(
      'bucketUrl',//百度云地址
      'bucketName',//bucketName
      'accessKeyId',
      'secrekKey',
      'httpversion'//version参数可不传
	);
	CameraMoudle.openNative(0);//拍照
	CameraMoudle.openNative(1);//相册选取一张照片
	CameraMoudle.multiChoise(2, maxChoise)//相册多选图片

	//获取图片URL
	let eventEmitter = new NativeEventEmitter(CameraMoudle);
      this.listener = eventEmitter.addListener('photo', (params) => {
        if (params === 'NoChoose') {
        } else if (params !== '(null)' && params && params !== 'NoChoose') {
          console.log(params);//返回图片数组
        } else {
          console.log('图片上传失败，请重试');
        }
      });

```