-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "msupply-ble-service", | ||
"version": "0.5.3", | ||
"name": "@openmsupply/msupply-ble-service", | ||
"version": "0.5.5", | ||
"description": "Low level bluetooth library", | ||
"author": "Chester Wood <[email protected]> (https://github.com/chetstone)", | ||
"license": "GPL-3.0-or-later", | ||
|
@@ -86,5 +86,5 @@ | |
"dependencies": { | ||
"buffer": "^6.0.3" | ||
}, | ||
"yalcSig": "e0f2ac2763896db23b9eb3398b7fcecc" | ||
"yalcSig": "4b8a288aa30f2b811289676652db5d3d" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4b8a288aa30f2b811289676652db5d3d |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,45 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.msupplycoldchain"> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
<uses-permission android:name="android.permission.BLUETOOTH"/> | ||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> | ||
<uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED"/> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> | ||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO"/> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
<uses-permission android:name="android.permission.VIBRATE" /> | ||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
|
||
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/> | ||
<uses-feature android:name="android.hardware.camera" android:required="false" /> | ||
|
||
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher" android:allowBackup="false" android:theme="@style/AppTheme" android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true"> | ||
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:theme="@style/Theme.App.SplashScreen"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/> | ||
<activity android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity" android:exported="true"/> | ||
<meta-data android:name="com.bugsnag.android.API_KEY" android:value="9083556ae736617ad9680a60a402824e"/> | ||
<service android:name="com.voximplant.foregroundservice.VIForegroundService" /> | ||
<service android:name="com.msupplycoldchain.SchedulerService" android:enabled="true" android:exported="false" /> | ||
<service android:name="com.msupplycoldchain.SchedulerEventService" /> | ||
<receiver android:name="com.msupplycoldchain.BootUpReceiver" android:enabled="true" android:permission="android.permission.RECEIVE_BOOT_COMPLETED"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</receiver> | ||
</application> | ||
<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 commentThe reason will be displayed to describe this comment to others. Learn more. This is what we're using now if I understand correctly... |
||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> | ||
<!-- Android < 12 --> | ||
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> | ||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" /> | ||
<!-- common --> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
<uses-permission android:name="android.permission.VIBRATE" /> | ||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" /> | ||
<uses-feature android:name="android.hardware.camera" android:required="false" /> | ||
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher" android:allowBackup="false" android:theme="@style/AppTheme" android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true"> | ||
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:theme="@style/Theme.App.SplashScreen" android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="true" /> | ||
<activity android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity" android:exported="true" /> | ||
<meta-data android:name="com.bugsnag.android.API_KEY" android:value="9083556ae736617ad9680a60a402824e" /> | ||
<service android:name="com.voximplant.foregroundservice.VIForegroundService" /> | ||
<service android:name="com.msupplycoldchain.SchedulerService" android:enabled="true" android:exported="true" /> | ||
<service android:name="com.msupplycoldchain.SchedulerEventService" /> | ||
<receiver android:name="com.msupplycoldchain.BootUpReceiver" android:enabled="true" android:permission="android.permission.RECEIVE_BOOT_COMPLETED" android:exported="false"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</receiver> | ||
</application> | ||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,16 @@ public void onDestroy() { | |
|
||
public static Notification buildNotification(Context context, String text) { | ||
Intent notificationIntent = new Intent(context, MainActivity.class); | ||
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT); | ||
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 commentThe 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... |
||
} | ||
else | ||
{ | ||
contentIntent = PendingIntent.getActivity | ||
(context, 0, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT); | ||
} | ||
|
||
return new NotificationCompat.Builder(context, CHANNEL_ID) | ||
.setContentTitle("ColdChain service") // getApplicationName | ||
|
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