question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getDeviceLocale is not updated when changed on the phone

See original GitHub issue

Summary

Version 0.26.2
Affected OS android
OS Version all

Current behavior

  1. Read getDeviceLocale() in any app
  2. Put the app in background mode and change the locale of the phone
  3. Go back to the app and read getDeviceLocale() it has not changed

Expected behavior

getDeviceLocale()should return the real device at the moment of the call

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

1reaction
xinfangcommented, Mar 15, 2019

+1

0reactions
mikehardycommented, Apr 4, 2019

yes - and there are some things that react-native-carrier-info seem like would be a great place but that package doesn’t seem active and the maintainer hasn’t responded to me. netinfo will be well-maintained though so would be a good home for APIs. I’ll look through them to see where we duplicate, for a similar sort of deprecate/remove proposal. Thanks for mentioning it

Read more comments on GitHub >

github_iconTop Results From Across the Web

getDeviceLocale is not updated when changed on the phone
Summary Version 0.26.2 Affected OS android OS Version all Current behavior Read getDeviceLocale() in any app Put the app in background mode ...
Read more >
How to use the react-native-device-info.getDeviceLocale ...
To help you get started, we've selected a few react-native-device-info. ... supportedLocales array // PROBABLY DO NOT CHANGE ANYTHING BELOW THIS LINE import ......
Read more >
What's the best way to get device locale in react native (iOS)?
To test this, I changed the language on my device to French. Here's a sample of what you'll find in the NativeModules.SettingsManager.settings object ......
Read more >
react-native-device-info - npm
This used to require the android.permission.BLUETOOTH but the new implementation in v3 does not need it. You may remove that from your ...
Read more >
Localization - Expo Documentation
Get the latest native values from the device. Locale can be changed on some Android devices without resetting the app. On iOS, changing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found