-1

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

2 Answers2

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