Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: innoveit/react-native-ble-manager
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.5.0
Choose a base ref
...
head repository: innoveit/react-native-ble-manager
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 47,325 additions and 18,323 deletions.
  1. +38 −0 .github/ISSUE_TEMPLATE/bug_report.md
  2. +69 −0 .github/workflows/pages.yml
  3. +30 −0 .github/workflows/stale.yml
  4. +21 −20 .gitignore
  5. +2 −0 .npmignore
  6. +9 −0 .prettierrc
  7. +0 −415 BleManager.js
  8. +0 −33 ISSUE_TEMPLATE.md
  9. +48 −726 README.md
  10. +24 −0 RNBleManager.podspec
  11. +14 −0 SECURITY.md
  12. +19 −0 android/.npmignore
  13. +106 −22 android/build.gradle
  14. +4 −1 android/gradle.properties
  15. +17 −8 android/src/main/AndroidManifest.xml
  16. +0 −47 android/src/main/java/it/innove/BLECommand.java
  17. +955 −687 android/src/main/java/it/innove/BleManager.java
  18. +15 −14 android/src/main/java/it/innove/BleManagerPackage.java
  19. +175 −0 android/src/main/java/it/innove/CompanionScanner.java
  20. +115 −0 android/src/main/java/it/innove/DefaultPeripheral.java
  21. +272 −0 android/src/main/java/it/innove/DefaultScanManager.java
  22. +0 −1 android/src/main/java/it/innove/Helper.java
  23. +0 −95 android/src/main/java/it/innove/LegacyScanManager.java
  24. +0 −91 android/src/main/java/it/innove/LollipopPeripheral.java
  25. +0 −136 android/src/main/java/it/innove/LollipopScanManager.java
  26. +29 −15 android/src/main/java/it/innove/NotifyBufferContainer.java
  27. +1,233 −826 android/src/main/java/it/innove/Peripheral.java
  28. +28 −23 android/src/main/java/it/innove/ScanManager.java
  29. +1 −0 app.plugin.js
  30. +5 −0 babel.config.js
  31. +14 −0 dependabot.yml
  32. +5 −0 docs/.gitignore
  33. +25 −0 docs/404.html
  34. +7 −0 docs/Gemfile
  35. +88 −0 docs/Gemfile.lock
  36. +20 −0 docs/_config.yml
  37. +1 −0 docs/_includes/footer_custom.html
  38. +1 −0 docs/_includes/head_custom.html
  39. +24 −0 docs/_includes/nav_footer_custom.html
  40. +119 −0 docs/_sass/custom/custom.scss
  41. +1 −0 docs/_sass/custom/setup.scss
  42. +44 −0 docs/changelog.markdown
  43. +175 −0 docs/events.markdown
  44. +36 −0 docs/expo.markdown
  45. BIN docs/favicon.ico
  46. +27 −0 docs/index.markdown
  47. +85 −0 docs/install.markdown
  48. +867 −0 docs/methods.markdown
  49. +16 −0 docs/troubleshooting.markdown
  50. +11 −0 docs/usage.markdown
  51. +0 −6 example/.buckconfig
  52. +2 −0 example/.bundle/config
  53. +5 −1 example/.eslintrc.js
  54. +0 −73 example/.flowconfig
  55. +0 −1 example/.gitattributes
  56. +21 −10 example/.gitignore
  57. +1 −0 example/.node-version
  58. +0 −6 example/.prettierrc.js
  59. +1 −0 example/.ruby-version
  60. +0 −302 example/App.js
  61. +24 −0 example/App.tsx
  62. +6 −0 example/Gemfile
  63. +100 −0 example/Gemfile.lock
  64. +20 −0 example/README.md
  65. 0 example/__tests__/{App-test.js → App-test.tsx}
  66. +0 −55 example/android/app/BUCK
  67. +0 −219 example/android/app/build.gradle
  68. +0 −19 example/android/app/build_defs.bzl
  69. BIN example/android/app/debug.keystore
  70. +0 −10 example/android/app/proguard-rules.pro
  71. +0 −8 example/android/app/src/debug/AndroidManifest.xml
  72. +0 −72 example/android/app/src/debug/java/com/example/ReactNativeFlipper.java
  73. +0 −31 example/android/app/src/main/AndroidManifest.xml
  74. +0 −15 example/android/app/src/main/java/com/example/MainActivity.java
  75. +0 −80 example/android/app/src/main/java/com/example/MainApplication.java
  76. BIN example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  77. BIN example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  78. BIN example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  79. BIN example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  80. BIN example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  81. BIN example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  82. BIN example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  83. BIN example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  84. BIN example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  85. BIN example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  86. +0 −3 example/android/app/src/main/res/values/strings.xml
  87. +0 −9 example/android/app/src/main/res/values/styles.xml
  88. +0 −37 example/android/build.gradle
  89. +0 −28 example/android/gradle.properties
  90. +0 −3 example/android/settings.gradle
  91. +19 −0 example/app.config.js
  92. +8 −2 example/app.json
  93. +5 −2 example/babel.config.js
  94. +129 −0 example/components/PeripheralDetailsScreen.tsx
  95. +626 −0 example/components/ScanDevicesScreen.tsx
  96. BIN example/icon.png
  97. +0 −33 example/ios/Podfile
  98. +0 −469 example/ios/Podfile.lock
  99. +0 −53 example/ios/example-tvOS/Info.plist
  100. +0 −24 example/ios/example-tvOSTests/Info.plist
  101. +0 −972 example/ios/example.xcodeproj/project.pbxproj
  102. +0 −7 example/ios/example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  103. +0 −8 example/ios/example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  104. +0 −88 example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme
  105. +0 −88 example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme
  106. +0 −10 example/ios/example.xcworkspace/contents.xcworkspacedata
  107. +0 −8 example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  108. +0 −8 example/ios/example/AppDelegate.h
  109. +0 −58 example/ios/example/AppDelegate.m
  110. +0 −53 example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json
  111. +0 −6 example/ios/example/Images.xcassets/Contents.json
  112. +0 −59 example/ios/example/Info.plist
  113. +0 −58 example/ios/example/LaunchScreen.storyboard
  114. +0 −9 example/ios/example/main.m
  115. +0 −24 example/ios/exampleTests/Info.plist
  116. +0 −65 example/ios/exampleTests/exampleTests.m
  117. +18 −16 example/metro.config.js
  118. +13,079 −10,067 example/package-lock.json
  119. +33 −16 example/package.json
  120. BIN example/splash.png
  121. +13 −0 example/tsconfig.json
  122. +0 −128 index.d.ts
  123. +0 −10 ios/BLECommandContext.h
  124. +0 −5 ios/BLECommandContext.m
  125. +7 −0 ios/BleManager-Bridging-Header.h
  126. +37 −24 ios/BleManager.h
  127. +0 −1,041 ios/BleManager.m
  128. +301 −0 ios/BleManager.mm
  129. +0 −321 ios/BleManager.xcodeproj/project.pbxproj
  130. +0 −7 ios/BleManager.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  131. +0 −8 ios/BleManager.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  132. +0 −16 ios/CBPeripheral+Extensions.h
  133. +0 −307 ios/CBPeripheral+Extensions.m
  134. +363 −0 ios/Helper.swift
  135. +0 −11 ios/NSData+Conversion.h
  136. +0 −41 ios/NSData+Conversion.m
  137. +7 −0 ios/RNBleManager.h
  138. +1,252 −0 ios/SwiftBleManager.swift
  139. +24,339 −3 package-lock.json
  140. +114 −29 package.json
  141. +40 −0 plugin/src/withBLE.ts
  142. +209 −0 plugin/src/withBLEAndroidManifest.ts
  143. +18 −0 plugin/src/withBluetoothPermissions.ts
  144. +10 −0 plugin/tsconfig.json
  145. +0 −17 react-native-ble-manager.podspec
  146. +12 −0 react-native.config.js
  147. +417 −0 src/NativeBleManager.ts
  148. +874 −0 src/index.ts
  149. +398 −0 src/types.ts
  150. +6 −0 tea.yaml
  151. +16 −0 tsconfig.json
  152. +0 −4 yarn.lock
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Before open an issue**
- Check the closed issues, your question maybe is not new.
- We can't debug or reproduce hardware issue.
- If the library is not working 99% you did something wrong, in the code, installation or in the phone permissions.

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- react-native-ble-manager version:
- react-native version:

**Additional context**
Add any other context about the problem here.
69 changes: 69 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy docs to Pages

on:
push:
branches: ["master"]
paths: ["docs/**"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: '${{ github.workspace }}/docs'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
# Automatically uploads an artifact from the 'docs/_site' directory by default
uses: actions/upload-pages-artifact@v3
with:
path: docs/_site/

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
30 changes: 30 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark and close stale issues

on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.STALE_TOKEN }}
days-before-stale: 90
ignore-pr-updates: true
days-before-pr-stale: -1
days-before-pr-close: -1
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
stale-issue-label: 'stale'
exempt-issue-labels: 'bug, enhancement'
exempt-all-assignees: true
41 changes: 21 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
# android
.idea

android/local.properties
android/.project
android/.settings
android/.classpath
.vscode
.gradle
*.iml
*.hprof
/android/local.properties
/android/.project
/android/.settings
/android/.classpath
/android/gradle
/android/gradlew
/android/gradlew.bat
gen/

# JS dependencies & generated files
node_modules/
npm-debug.log
yarn-error.log
dist/

.gradle
gradle
gradlew
gradlew.bat

node_modules
## Build generated
build/
*.tsbuildinfo

# OSX
#
.DS_Store

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData

*.tgz

*.xcuserstate

xcuserdata

*.iml
*.swp
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.github
docs
example
.git
*.DS_Store
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"quoteProps": "consistent",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"bracketSpacing": true,
"arrowParen": "singleline"
}
Loading