I want to develop an android app like amazon.Here my question is how to show my products depends on country. For example if i am in India my app shows Indian products only and if I am in US my app shows US products only. Is it possible, Please help me, thanks and advance
Asked
Active
Viewed 43 times
-1
-
If you get location permission- you can load data from your API based on location – baderkhane Mar 21 '19 at 07:35
-
2Check https://stackoverflow.com/questions/11082681/get-country-from-coordinates – siusiulala Mar 21 '19 at 07:36
2 Answers
0
You can fetch the user location through https://developers.google.com/location-context/fused-location-provider/ as soon as the user opens the application and pass it to your backend, and there on the backend, you can write the logic to pass the data as per location.

sharma.mahesh369
- 985
- 11
- 28
0
you can get your country depended on your location:
context.getResources().getConfiguration().locale.getCountry();
... and the set some filters to your logic
And first of all request location permission

godot
- 3,422
- 6
- 25
- 42