-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Java 11, react-native-ble-plx 3.1.2 #299
Conversation
|
||
``` | ||
export JDK_HOME=~/.jenv/versions/oracle64-1.8.0.192 && JAVA_HOME=~/.jenv/versions/oracle64-1.8.0.192 && yarn start | ||
sdk use java 11.0.23-zulu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this as it seems we need java11+ now that we're targeting a SDK 23.
Haven't tired 17 or other more modern ones, wasn't working before...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api level 23 is android 6 - given that the samsung I'm using is older, and android 12.. we're probably ok
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<!-- Android >= 12 --> | ||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what we're using now if I understand correctly...
PendingIntent contentIntent = null; | ||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { | ||
contentIntent = PendingIntent.getActivity | ||
(context, 0, notificationIntent, PendingIntent.FLAG_MUTABLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparenlty IMMUTABLE Is safer but wanted to just get it working for now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App is running nicely - so I approve that part. Am wondering though if an older version of the ble-service is being used? can you check / revert those changes? shouldn't affect the upgrade aspec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jmbrunskill - Looks good!
This PR Updates the react-native-ble-plx library.
The updated library might help with data collection reliability issues such as #251 (Temperature Spikes)
It also paves the way for reading the advertisement packets as it provides access to the Raw scan data.
Inorder to get the new version working I had to use a newer version of Java and target a newer version of the Android SDK. This seems like a bit of a shame in some ways but also not a bad thing?
A POC of reading this has been done, example code here...