NewsApp icon indicating copy to clipboard operation
NewsApp copied to clipboard

Fetch news based upon the user location

Open sridharjajoo opened this issue 6 years ago • 2 comments

Currently the news is fetched only from indian source. Add the feature to fetch news based on user location. The process to do this is quite simple. Currently the API used to fetch headlines has "in" as one of the query parameters. We need to get the present location of the user and based upon that change the query parameter.

sridharjajoo avatar Dec 23 '18 15:12 sridharjajoo

@sridharjajoo Can you help me in finding the right function to find the country code? I tried various codes by searching on StackOverflow but in all the codes I am getting the same problem that the location is been shown null.

rob729 avatar Jan 02 '19 09:01 rob729

You can find out the current location of the user let's say India, Australia etc. Then you can create a map in which the key can be the country and value can be the country code

sridharjajoo avatar Jan 02 '19 09:01 sridharjajoo