Skip to content

Commit 17ba1e2

Browse files
authored
Merge pull request #5398 from TrainLCD/dev
2 parents 1773ffd + 75c9468 commit 17ba1e2

File tree

8 files changed

+245
-66
lines changed

8 files changed

+245
-66
lines changed

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ android {
143143
dimension "environment"
144144
applicationId "me.tinykitten.trainlcd.dev"
145145
versionNameSuffix "-dev"
146-
versionCode 100000263
146+
versionCode 100000264
147147
versionName "10.1.2"
148148
}
149149
prod {
150150
dimension "environment"
151-
versionCode 100000263
151+
versionCode 100000264
152152
versionName "10.1.2"
153153
}
154154
}

android/app/src/main/java/me/tinykitten/trainlcd/LiveUpdateModule.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import android.graphics.Color
1111
import android.graphics.Paint
1212
import android.graphics.drawable.Icon
1313
import android.os.Build
14+
import android.os.Bundle
1415
import com.facebook.react.bridge.ReactApplicationContext
1516
import com.facebook.react.bridge.ReactContextBaseJavaModule
1617
import com.facebook.react.bridge.ReactMethod
@@ -185,9 +186,10 @@ class LiveUpdateModule(reactContext: ReactApplicationContext) :
185186
)
186187

187188
val shortCriticalText = when {
188-
passingStationName.isNotEmpty() -> passingStationName
189+
passingStationName.isNotEmpty() -> reactApplicationContext.getString(R.string.live_update_passing, passingStationName)
189190
stopped -> stationName
190-
else -> nextStationName
191+
approaching -> reactApplicationContext.getString(R.string.live_update_approaching, nextStationName)
192+
else -> reactApplicationContext.getString(R.string.live_update_next, nextStationName)
191193
}
192194

193195
val builder = Notification.Builder(reactApplicationContext, CHANNEL_ID)
@@ -199,7 +201,9 @@ class LiveUpdateModule(reactContext: ReactApplicationContext) :
199201
.setOngoing(true)
200202
.setOnlyAlertOnce(true)
201203
.setShortCriticalText(shortCriticalText)
202-
.setRequestPromotedOngoing(true)
204+
.addExtras(Bundle().apply {
205+
putBoolean("android.requestPromotedOngoing", true)
206+
})
203207

204208
createContentIntent()?.let { builder.setContentIntent(it) }
205209

app.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default ({ config }: ConfigContext) => ({
4343
},
4444
},
4545
ios: {
46-
buildNumber: '2476',
46+
buildNumber: '2477',
4747
bundleIdentifier:
4848
process.env.EAS_BUILD_PROFILE === 'production'
4949
? 'me.tinykitten.trainlcd'
@@ -60,7 +60,7 @@ export default ({ config }: ConfigContext) => ({
6060
? 'me.tinykitten.trainlcd'
6161
: 'me.tinykitten.trainlcd.dev',
6262
permissions: [],
63-
versionCode: 100000263,
63+
versionCode: 100000264,
6464
},
6565
owner: 'trainlcd',
6666
});
@@ -92,5 +92,6 @@ export default ({ config }: ConfigContext) => ({
9292

9393

9494

95+
9596

9697

ios/TrainLCD.xcodeproj/project.pbxproj

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,7 +2435,7 @@
24352435
CODE_SIGN_ENTITLEMENTS = ProdTrainLCD.entitlements;
24362436
CODE_SIGN_IDENTITY = "Apple Development";
24372437
CODE_SIGN_STYLE = Automatic;
2438-
CURRENT_PROJECT_VERSION = 2476;
2438+
CURRENT_PROJECT_VERSION = 2477;
24392439
DEAD_CODE_STRIPPING = YES;
24402440
DEVELOPMENT_TEAM = E6R2G33Z36;
24412441
INFOPLIST_FILE = TrainLCD/Schemes/Prod/Info.plist;
@@ -2474,7 +2474,7 @@
24742474
CODE_SIGN_ENTITLEMENTS = ProdTrainLCD.entitlements;
24752475
CODE_SIGN_IDENTITY = "Apple Development";
24762476
CODE_SIGN_STYLE = Automatic;
2477-
CURRENT_PROJECT_VERSION = 2476;
2477+
CURRENT_PROJECT_VERSION = 2477;
24782478
DEVELOPMENT_TEAM = E6R2G33Z36;
24792479
INFOPLIST_FILE = TrainLCD/Schemes/Prod/Info.plist;
24802480
INFOPLIST_KEY_CFBundleDisplayName = TrainLCD;
@@ -2533,7 +2533,7 @@
25332533
CODE_SIGN_ENTITLEMENTS = TrainLCD/trainlcd.entitlements;
25342534
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
25352535
COPY_PHASE_STRIP = NO;
2536-
CURRENT_PROJECT_VERSION = 2476;
2536+
CURRENT_PROJECT_VERSION = 2477;
25372537
CXX = "";
25382538
ENABLE_STRICT_OBJC_MSGSEND = YES;
25392539
ENABLE_TESTABILITY = YES;
@@ -2639,7 +2639,7 @@
26392639
CODE_SIGN_ENTITLEMENTS = TrainLCD/trainlcd.entitlements;
26402640
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
26412641
COPY_PHASE_STRIP = YES;
2642-
CURRENT_PROJECT_VERSION = 2476;
2642+
CURRENT_PROJECT_VERSION = 2477;
26432643
CXX = "";
26442644
ENABLE_NS_ASSERTIONS = NO;
26452645
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -2718,7 +2718,7 @@
27182718
CODE_SIGN_ENTITLEMENTS = CanaryTrainLCD.entitlements;
27192719
CODE_SIGN_IDENTITY = "Apple Development";
27202720
CODE_SIGN_STYLE = Automatic;
2721-
CURRENT_PROJECT_VERSION = 2476;
2721+
CURRENT_PROJECT_VERSION = 2477;
27222722
DEAD_CODE_STRIPPING = YES;
27232723
DEVELOPMENT_TEAM = E6R2G33Z36;
27242724
INFOPLIST_FILE = TrainLCD/Schemes/Dev/Info.plist;
@@ -2757,7 +2757,7 @@
27572757
CODE_SIGN_ENTITLEMENTS = CanaryTrainLCD.entitlements;
27582758
CODE_SIGN_IDENTITY = "Apple Development";
27592759
CODE_SIGN_STYLE = Automatic;
2760-
CURRENT_PROJECT_VERSION = 2476;
2760+
CURRENT_PROJECT_VERSION = 2477;
27612761
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
27622762
DEVELOPMENT_TEAM = E6R2G33Z36;
27632763
INFOPLIST_FILE = TrainLCD/Schemes/Dev/Info.plist;
@@ -2968,7 +2968,7 @@
29682968
CODE_SIGN_ENTITLEMENTS = RideSessionActivity/CanaryRideSessionActivity.entitlements;
29692969
CODE_SIGN_IDENTITY = "Apple Development";
29702970
CODE_SIGN_STYLE = Automatic;
2971-
CURRENT_PROJECT_VERSION = 2476;
2971+
CURRENT_PROJECT_VERSION = 2477;
29722972
DEBUG_INFORMATION_FORMAT = dwarf;
29732973
DEVELOPMENT_TEAM = E6R2G33Z36;
29742974
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -3019,7 +3019,7 @@
30193019
CODE_SIGN_IDENTITY = "Apple Development";
30203020
CODE_SIGN_STYLE = Automatic;
30213021
COPY_PHASE_STRIP = NO;
3022-
CURRENT_PROJECT_VERSION = 2476;
3022+
CURRENT_PROJECT_VERSION = 2477;
30233023
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
30243024
DEVELOPMENT_TEAM = E6R2G33Z36;
30253025
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -3070,7 +3070,7 @@
30703070
CODE_SIGN_ENTITLEMENTS = WatchWidget/ProdWatchWidget.entitlements;
30713071
CODE_SIGN_IDENTITY = "Apple Development";
30723072
CODE_SIGN_STYLE = Automatic;
3073-
CURRENT_PROJECT_VERSION = 2476;
3073+
CURRENT_PROJECT_VERSION = 2477;
30743074
DEBUG_INFORMATION_FORMAT = dwarf;
30753075
DEVELOPMENT_TEAM = E6R2G33Z36;
30763076
ENABLE_USER_SCRIPT_SANDBOXING = YES;
@@ -3128,7 +3128,7 @@
31283128
CODE_SIGN_IDENTITY = "Apple Development";
31293129
CODE_SIGN_STYLE = Automatic;
31303130
COPY_PHASE_STRIP = NO;
3131-
CURRENT_PROJECT_VERSION = 2476;
3131+
CURRENT_PROJECT_VERSION = 2477;
31323132
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
31333133
DEVELOPMENT_TEAM = E6R2G33Z36;
31343134
ENABLE_USER_SCRIPT_SANDBOXING = YES;
@@ -3179,7 +3179,7 @@
31793179
CODE_SIGN_ENTITLEMENTS = WatchWidget/CanaryWatchWidget.entitlements;
31803180
CODE_SIGN_IDENTITY = "Apple Development";
31813181
CODE_SIGN_STYLE = Automatic;
3182-
CURRENT_PROJECT_VERSION = 2476;
3182+
CURRENT_PROJECT_VERSION = 2477;
31833183
DEBUG_INFORMATION_FORMAT = dwarf;
31843184
DEVELOPMENT_TEAM = E6R2G33Z36;
31853185
ENABLE_USER_SCRIPT_SANDBOXING = YES;
@@ -3236,7 +3236,7 @@
32363236
CODE_SIGN_IDENTITY = "Apple Development";
32373237
CODE_SIGN_STYLE = Automatic;
32383238
COPY_PHASE_STRIP = NO;
3239-
CURRENT_PROJECT_VERSION = 2476;
3239+
CURRENT_PROJECT_VERSION = 2477;
32403240
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
32413241
DEVELOPMENT_TEAM = E6R2G33Z36;
32423242
ENABLE_USER_SCRIPT_SANDBOXING = YES;
@@ -3284,7 +3284,7 @@
32843284
CODE_SIGN_ENTITLEMENTS = RideSessionActivity/ProdRideSessionActivity.entitlements;
32853285
CODE_SIGN_IDENTITY = "Apple Development";
32863286
CODE_SIGN_STYLE = Automatic;
3287-
CURRENT_PROJECT_VERSION = 2476;
3287+
CURRENT_PROJECT_VERSION = 2477;
32883288
DEBUG_INFORMATION_FORMAT = dwarf;
32893289
DEVELOPMENT_TEAM = E6R2G33Z36;
32903290
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -3335,7 +3335,7 @@
33353335
CODE_SIGN_IDENTITY = "Apple Development";
33363336
CODE_SIGN_STYLE = Automatic;
33373337
COPY_PHASE_STRIP = NO;
3338-
CURRENT_PROJECT_VERSION = 2476;
3338+
CURRENT_PROJECT_VERSION = 2477;
33393339
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
33403340
DEVELOPMENT_TEAM = E6R2G33Z36;
33413341
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -3554,7 +3554,7 @@
35543554
CODE_SIGN_ENTITLEMENTS = ProdAppClip/ProdAppClip.entitlements;
35553555
CODE_SIGN_IDENTITY = "Apple Development";
35563556
CODE_SIGN_STYLE = Automatic;
3557-
CURRENT_PROJECT_VERSION = 2476;
3557+
CURRENT_PROJECT_VERSION = 2477;
35583558
DEBUG_INFORMATION_FORMAT = dwarf;
35593559
DEVELOPMENT_TEAM = E6R2G33Z36;
35603560
ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -3610,7 +3610,7 @@
36103610
CODE_SIGN_IDENTITY = "Apple Development";
36113611
CODE_SIGN_STYLE = Automatic;
36123612
COPY_PHASE_STRIP = NO;
3613-
CURRENT_PROJECT_VERSION = 2476;
3613+
CURRENT_PROJECT_VERSION = 2477;
36143614
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
36153615
DEVELOPMENT_TEAM = E6R2G33Z36;
36163616
ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -3660,7 +3660,7 @@
36603660
CODE_SIGN_ENTITLEMENTS = CanaryAppClip/CanaryAppClip.entitlements;
36613661
CODE_SIGN_IDENTITY = "Apple Development";
36623662
CODE_SIGN_STYLE = Automatic;
3663-
CURRENT_PROJECT_VERSION = 2476;
3663+
CURRENT_PROJECT_VERSION = 2477;
36643664
DEBUG_INFORMATION_FORMAT = dwarf;
36653665
DEVELOPMENT_TEAM = E6R2G33Z36;
36663666
ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -3718,7 +3718,7 @@
37183718
CODE_SIGN_IDENTITY = "Apple Development";
37193719
CODE_SIGN_STYLE = Automatic;
37203720
COPY_PHASE_STRIP = NO;
3721-
CURRENT_PROJECT_VERSION = 2476;
3721+
CURRENT_PROJECT_VERSION = 2477;
37223722
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
37233723
DEVELOPMENT_TEAM = E6R2G33Z36;
37243724
ENABLE_USER_SCRIPT_SANDBOXING = NO;

src/constants/location.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export const LOCATION_TIME_INTERVAL = 2000;
77

88
export const MAX_PERMIT_ACCURACY = 4000;
99

10+
export const LOCATION_START_MAX_RETRIES = 3;
11+
export const LOCATION_START_RETRY_BASE_DELAY_MS = 1000;
12+
1013
export const LOCATION_TASK_OPTIONS: Location.LocationTaskOptions = {
1114
accuracy: LOCATION_ACCURACY,
1215
distanceInterval: LOCATION_DISTANCE_INTERVAL,

0 commit comments

Comments
 (0)