Skip to content

Commit

Permalink
Merge pull request #7 from NJITBlockchainLab/bluetooth
Browse files Browse the repository at this point in the history
Add Bluetooth module.
  • Loading branch information
wYaobiz authored Jul 10, 2024
2 parents 8caff70 + 9ffdfce commit 8525467
Show file tree
Hide file tree
Showing 114 changed files with 3,300 additions and 638 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
"@aries-framework/react-hooks": "patch:@aries-framework/react-hooks@npm:0.4.2#./.yarn/patches/@aries-framework-react-hooks-npm-0.4.2-84b7eb8764.patch"
},
"dependencies": {
"lottie-react-native": "^6.6.0",
"react-native-ble-manager": "^11.5.3",
"react-native-ble-plx": "^3.1.2",
"react-native-maps": "^1.15.4",
"react-native-qrcode-svg": "^6.2.0",
"react-native-svg": "^14.1.0"
}
Expand Down
16 changes: 16 additions & 0 deletions packages/legacy/app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,23 @@ dependencies {
} else {
implementation jscFlavor
}
implementation 'com.polidea.rxandroidble2:dagger-library-shadow:1.17.2'
implementation 'org.reactivestreams:reactive-streams:1.0.3'
implementation 'io.reactivex.rxjava2:rxjava:2.2.17'
implementation 'com.jakewharton.rxrelay2:rxrelay:2.1.1'
implementation 'com.polidea.rxandroidble2:rxandroidble:1.17.2'
}

apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}

// Explicitly declare the dependency between lintAnalyzeDebug and copyReactNativeVectorIconFonts
tasks.whenTaskAdded { task ->
if (task.name.startsWith("lintAnalyze")) {
task.dependsOn("copyReactNativeVectorIconFonts")
}
}
58 changes: 38 additions & 20 deletions packages/legacy/app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ariesbifold">
xmlns:tools="http://schemas.android.com/tools"
package="com.ariesbifold">

<!-- Only when targeting Android 12 or higher -->
<!-- Please make sure you read the following documentation to have a
better understanding of the new permissions.
https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#assert-never-for-location
-->

<!-- Request legacy Bluetooth permissions on older devices. -->
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
<!-- Needed only if your app makes the device discoverable to Bluetooth devices. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<uses-permission android:name="android.permission.USE_BIOMETRICS" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -9,25 +25,27 @@
<uses-permission-sdk-23 android:name="android.permission.VIBRATE"/>

<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/basic_swish"
android:allowBackup="false"
android:resizeableActivity="false"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:name=".MainApplication"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
android:icon="@mipmap/basic_swish"
android:allowBackup="false"
android:resizeableActivity="false"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="android:label, android:icon, android:allowBackup, android:resizeableActivity, android:theme, android:usesCleartextTraffic">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="fullSensor"
android:exported="true"
tools:replace="android:label, android:configChanges, android:launchMode, android:windowSoftInputMode, android:screenOrientation, android:exported">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Loading

0 comments on commit 8525467

Please sign in to comment.