Skip to content
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

It seems that onboarding is not detecting the country anymore #1388

Closed
Tracked by #561
teolemon opened this issue Mar 29, 2022 · 11 comments
Closed
Tracked by #561

It seems that onboarding is not detecting the country anymore #1388

teolemon opened this issue Mar 29, 2022 · 11 comments
Labels
Android 🐛 bug Something isn't working 🤗 Onboarding We need to onboard users on how the app works, but also on content like Nutri-Score, Eco-Score… 🎯 P1
Milestone

Comments

@teolemon
Copy link
Member

What

  • It seems that onboarding is not detecting the country anymore

Steps to reproduce the behavior

  1. Go to Dev Mode
  2. Click on 'Restart onboarding'
  3. See US selected by default

Expected behavior

The app uses the phones lang_country code or any kind of local wizardry to infer country

Part of

Screenshot/Mockup/Before-After

image

Smartphone model

  • Android 12L Pixel 6 and others
@teolemon teolemon added 🐛 bug Something isn't working 🤗 Onboarding We need to onboard users on how the app works, but also on content like Nutri-Score, Eco-Score… labels Mar 29, 2022
@VaiTon
Copy link
Member

VaiTon commented Mar 29, 2022

Is your phone in English?

final String locale = Localizations.localeOf(context).languageCode;

If that's so it is right because the code is taking the en and showing countries with en as primary language.

@VaiTon
Copy link
Member

VaiTon commented Mar 30, 2022

What behavior do we want for this?

  • It gets the actual used language and try to guess which country it is from;
  • It gets the actual locale from the device;
  • It access the user's location to get the actual country?

@g123k
Copy link
Collaborator

g123k commented Apr 7, 2022

With the upcoming version of Android (13), users can opt for a different language per application.
The current implementation will reach its limits with that change.

Maybe we should use a combination of several data:

  • Current timezone
  • Location of the "external" IP
  • User language

Let's imagine with all these inputs, we still have several choices, we could show them at the top of the list of choices

@monsieurtanuki
Copy link
Contributor

Perhaps it would be easier and more intuitive to implement a search field as already mentioned in #1200 by @bhattabhi013, or find another country picker (like https://pub.dev/packages/country_picker ?)
That would look a bit like the iOS settings:
Simulator Screen Shot - iPhone 8 Plus - 2022-04-07 at 11 13 32

Btw on my iOS emulator the country is correctly detected (from the emulator settings).

@VaiTon
Copy link
Member

VaiTon commented Apr 7, 2022

Maybe we should use a combination of several data:

* Current timezone
* Location of the "external" IP
* User language

Using the second one would not be that privacy-friendly of us :(

@teolemon
Copy link
Member Author

teolemon commented Apr 11, 2022

@monsieurtanuki
Copy link
Contributor

@teolemon I assumed that the languages and countries supported are the ones found in off-dart's OpenFoodFactsLanguage and OpenFoodFactsCountry.

@M123-dev
Copy link
Member

M123-dev commented Jun 8, 2022

Still a thing @teolemon ?

@teolemon teolemon modified the milestones: V1, V1.1 Jun 18, 2022
@monsieurtanuki
Copy link
Contributor

https://pub.dev/packages/devicelocale may help (never tried)

@M123-dev
Copy link
Member

M123-dev commented Aug 5, 2022

Should be fixed

@M123-dev M123-dev closed this as completed Aug 5, 2022
Repository owner moved this from To reproduce to Done in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android 🐛 bug Something isn't working 🤗 Onboarding We need to onboard users on how the app works, but also on content like Nutri-Score, Eco-Score… 🎯 P1
Development

No branches or pull requests

5 participants