{"action":"created","issue":{"url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/425","repository_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info","labels_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/425/labels{/name}","comments_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/425/comments","events_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/425/events","html_url":"https://github.com/rebeccahughes/react-native-device-info/issues/425","id":329485284,"node_id":"MDU6SXNzdWUzMjk0ODUyODQ=","number":425,"title":"Deprecated accessing locale directly on Android","user":{"login":"ghsdh3409","id":6203798,"node_id":"MDQ6VXNlcjYyMDM3OTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6203798?v=4","gravatar_id":"","url":"https://api.github.com/users/ghsdh3409","html_url":"https://github.com/ghsdh3409","followers_url":"https://api.github.com/users/ghsdh3409/followers","following_url":"https://api.github.com/users/ghsdh3409/following{/other_user}","gists_url":"https://api.github.com/users/ghsdh3409/gists{/gist_id}","starred_url":"https://api.github.com/users/ghsdh3409/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghsdh3409/subscriptions","organizations_url":"https://api.github.com/users/ghsdh3409/orgs","repos_url":"https://api.github.com/users/ghsdh3409/repos","events_url":"https://api.github.com/users/ghsdh3409/events{/privacy}","received_events_url":"https://api.github.com/users/ghsdh3409/received_events","type":"User","site_admin":false},"labels":[{"id":825607413,"node_id":"MDU6TGFiZWw4MjU2MDc0MTM=","url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/labels/android","name":"android","color":"b9c6f7","default":false},{"id":261170315,"node_id":"MDU6TGFiZWwyNjExNzAzMTU=","url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":825624655,"node_id":"MDU6TGFiZWw4MjU2MjQ2NTU=","url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/labels/has%20PR","name":"has PR","color":"93ea85","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-05T14:33:43Z","updated_at":"2018-07-26T14:11:15Z","closed_at":"2018-07-26T14:11:15Z","author_association":"CONTRIBUTOR","body":"<!--\r\nHi there and thank you for reporting a bug! 🐛🐛🐛\r\n\r\nIf you want to submit a feature request, use this link instead:\r\n  https://github.com/rebeccahughes/react-native-device-info/issues/new?template=feature_request.md\r\n-->\r\n\r\n## Summary\r\n\r\n|             |     |\r\n| ----------- | --- |\r\n| Version     | 0.21.5   |\r\n| Affected OS | Android   |\r\n| OS Version  | 7.0 (API 24)   |\r\n\r\n## Current behavior\r\n\r\n<!-- Describe the issue you are facing, including any available error\r\nmessage, logs, stack trace .. -->\r\n\r\n* `getDeviceCountry` and `getDeviceLocale` are implemented by accessing `locale` directly on Android.\r\n* By the way, accessing `locale` directly is deprecated in API 24.\r\n  * https://developer.android.com/reference/android/content/res/Configuration#locale\r\n* Currently, I checked that deprecated one works even if API level 24.\r\n\r\n## Expected behavior\r\n* Android official document recommends using `getLocales().get(0)` to get primary locale.\r\n<!-- What should have happened instead of this bug -->\r\n"},"comment":{"url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/comments/408110852","html_url":"https://github.com/rebeccahughes/react-native-device-info/issues/425#issuecomment-408110852","issue_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/425","id":408110852,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODExMDg1Mg==","user":{"login":"machour","id":304450,"node_id":"MDQ6VXNlcjMwNDQ1MA==","avatar_url":"https://avatars2.githubusercontent.com/u/304450?v=4","gravatar_id":"","url":"https://api.github.com/users/machour","html_url":"https://github.com/machour","followers_url":"https://api.github.com/users/machour/followers","following_url":"https://api.github.com/users/machour/following{/other_user}","gists_url":"https://api.github.com/users/machour/gists{/gist_id}","starred_url":"https://api.github.com/users/machour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machour/subscriptions","organizations_url":"https://api.github.com/users/machour/orgs","repos_url":"https://api.github.com/users/machour/repos","events_url":"https://api.github.com/users/machour/events{/privacy}","received_events_url":"https://api.github.com/users/machour/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T14:11:15Z","updated_at":"2018-07-26T14:11:15Z","author_association":"COLLABORATOR","body":"Released in 0.22.1, thank you so much @ghsdh3409 & @ohtangza"}}
{"actor":{"display_login":"machour"}}