Skip to content

Commit

Permalink
fix markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonah Forst committed Apr 7, 2017
1 parent db8b257 commit 5856db5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ React native implementation of https://github.com/omergul123/Discovery

(Android uses https://github.com/joshblour/discovery-android)

####Changes from version 0.0.x
#### Changes from version 0.0.x
Now supports discovery with multiple UUIDs. You need to intialize each one separately and specify the UUID when you perform actions.
i.e. `Discovery.setShouldAdvertise(true);` now becomes `Discovery.setShouldAdvertise("3E1180E5-222E-43E9-98B4-E6C0DD18E728", true);`

##What
## What
Discovery is a very simple but useful library for discovering nearby devices with BLE(Bluetooth Low Energy) and for exchanging a value (kind of ID or username determined by you on the running app on peer device) regardless of whether the app on peer device works at foreground or background state.

####Example
#### Example
```js
const {DeviceEventEmitter} = require('react-native');
const Discovery = require('react-native-discovery');
Expand Down Expand Up @@ -49,7 +49,7 @@ DeviceEventEmitter.addListener(
```


####API
#### API

`initialize(uuid, username)` - string, string. Initialize the Discovery object with a UUID specific to your app, and a username specific to your device. Returns a promise which resolves to the specified UUID

Expand All @@ -69,18 +69,18 @@ DeviceEventEmitter.addListener(
`setWaitForSeconds(uuid, waitForSeconds)` - string, integer in seconds (default is 5). This parameter specifies the duration of the OFF part of the scan cycle for the specified uuid. Returns a promise which resolves to true.


##Setup
## Setup

````
npm install --save react-native-discovery
````

###iOS
### iOS
* Run open node_modules/react-native-discovery
* Drag ReactNativeDiscovery.xcodeproj into your Libraries group

###Android
#####Step 1 - Update Gradle Settings
### Android
##### Step 1 - Update Gradle Settings

```
// file: android/settings.gradle
Expand All @@ -89,7 +89,7 @@ npm install --save react-native-discovery
include ':react-native-discovery'
project(':react-native-discovery').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-discovery/android')
```
#####Step 2 - Update Gradle Build
##### Step 2 - Update Gradle Build

```
// file: android/app/build.gradle
Expand All @@ -100,7 +100,7 @@ dependencies {
compile project(':react-native-discovery')
}
```
#####Step 3 - Register React Package
##### Step 3 - Register React Package
```
...
import com.joshblour.reactnativediscovery.ReactNativeDiscoveryPackage; // <--- import
Expand Down

0 comments on commit 5856db5

Please sign in to comment.