# react-native-bluetooth-share

> Share your react native android app from within the app itself using Bluetooth.

Latest version **1.0.1** (published 2018-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-bluetooth-share
pnpm add react-native-bluetooth-share
yarn add react-native-bluetooth-share
bun add react-native-bluetooth-share
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-09-24 |
| First published | 2018-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nicolai Davies |
| Maintainers | nicolaidavies |
| Keywords | react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-bluetooth-share
- npm.io page: https://npm.io/package/react-native-bluetooth-share

## Recent versions

- 1.0.1 (latest) — 2018-09-24
- 1.0.0 — 2018-09-24

## README

# React Native Bluetooth Share

Allows you to share your react native app's .apk file via bluetooth.

It looks for the current app's apk file, renames it to the name provided and then sends it via bluetooth to another phone.

It's useful in places where access to internet is limited. Originally created for the Emoyeni app which works completely offline.

Link to [Cordova version here](https://github.com/Nicolaidavies/cordova-plugin-bluetooth-app-share)

Read more about the plugin on [my website](https://nicolai.io/projects/bluetooth-share)

## Getting started

`$ npm install react-native-bluetooth-share --save`

### Mostly automatic installation

`$ react-native link react-native-bluetooth-share`

### Manual installation

#### Android

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

## Usage
```javascript
import RNBluetoothShare from 'react-native-bluetooth-share';


RNBluetoothShare.sendAPK('app_name');
```

---
_Source: https://npm.io/package/react-native-bluetooth-share · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
