Open
Description
After updating react-native to version 0.80.1 an android doesn't work anymore.
Expected Behavior
The android platform works on react-native: 0.80.1
Current Behavior
There is an error
@amplitude/analytics-react-native/android/src/main/java/com/amplitude/reactnative/AndroidContextProvider.kt:118:30 'fun String.toUpperCase(locale: Locale): String' is deprecated. Use uppercase() instead.
Possible Solution
I've created patch that works fine
index 56fda93bdb8ee4c561d7e720ca2ea5de792aee4d..f4b5cd52b5e113a1d1ebe89d1521edd2dca0cedd 100644
--- a/android/src/main/java/com/amplitude/reactnative/AndroidContextProvider.kt
+++ b/android/src/main/java/com/amplitude/reactnative/AndroidContextProvider.kt
@@ -115,7 +115,7 @@ class AndroidContextProvider(private val context: Context, shouldTrackAdid: Bool
if (manager.phoneType != TelephonyManager.PHONE_TYPE_CDMA) {
val country = manager.networkCountryIso
if (country != null) {
- return country.toUpperCase(Locale.US)
+ return country.uppercase(Locale.US)
}
}
} catch (e: Exception) {
Environment
"react-native": "0.80.1",
"@amplitude/analytics-react-native": "1.4.13",