Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
naveenrobo committed Oct 6, 2021
2 parents d64e576 + c68131d commit 868a18c
Show file tree
Hide file tree
Showing 11 changed files with 5,176 additions and 5,912 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $ npm login --scope=@teamdotworld --registry=https://npm.pkg.github.com
Now install the package. See the releases and use latest version

```sh
npm install @teamdotworld/rn-ble-advertiser@2.1.0
npm install @teamdotworld/rn-ble-advertiser@2.3.0
```

---
Expand Down Expand Up @@ -74,7 +74,7 @@ import { Platform } from 'react-native';
import ReactNativeBleAdvertiser from '@teamdotworld/rn-ble-advertiser';

// Use a switch to turn it on or off
ReactNativeBleAdvertiser.init(); // Initalize the service
ReactNativeBleAdvertiser.initialize(); // Initalize the service
ReactNativeBleAdvertiser.setData('1234'); // set the data
setTimeout(() => {
// start the service after setting data. Restart if the data is changed after starting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class ReactNativeBleAdvertiserModule(reactContext: ReactApplicationContext) :
}

@ReactMethod
fun init() {
Log.i(TAG, "init: Init Called")
fun initialize() {
Log.i(TAG, "initialize: initialize Called")
}

@ReactMethod
Expand Down
2,775 changes: 952 additions & 1,823 deletions example/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"react": "16.13.1",
"react-native": "0.63.4"
"react-native": "0.64.1"
},
"devDependencies": {
"@babel/core": "^7.12.10",
Expand Down
2 changes: 1 addition & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function App() {
const [result, setResult] = React.useState<number | undefined>();

React.useEffect(() => {
ReactNativeBleAdvertiser.init();
ReactNativeBleAdvertiser.initialize();
ReactNativeBleAdvertiser.setData('1234');
setTimeout(() => {
ReactNativeBleAdvertiser.startBroadcast();
Expand Down
1,714 changes: 771 additions & 943 deletions example/yarn.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ios/ReactNativeBleAdvertiser.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ - (dispatch_queue_t)methodQueue
return @[@"level"];
}

RCT_EXPORT_METHOD(init){
RCTLogInfo(@"init function called");
RCT_EXPORT_METHOD(initialize){
RCTLogInfo(@"initialize function called");
peripheralManager = [[CBPeripheralManager alloc] initWithDelegate:self queue:nil options:nil];
}

Expand Down
Loading

0 comments on commit 868a18c

Please sign in to comment.