Adding restrictions to Fire TV Web app based on user's country
We recently successfully submitted a US-only version of our app based on the Fire TV web app starter kit (which was really great, by the way; we able very quickly to modify it to work with our content). We would now like to make a restricted version of the app available outside the US. Basically, non-US users should not have access to two of our live video streams. Can you point me to documentation that would help us to build restrictions into the app based on the user's country? For example, does the device make any settings available that would allow the web app to determine the user's country and choose the right content based on that? We could make the app do a geolocation query before getting the content, but that would increase the app's initial load time, which we'd like to avoid if possible. We would also like to avoid having different apps for the US and the rest of the world if possible, as the only thing that would be different would be the URL for retrieving the content, and everything else would be identical. Thanks for any help you can give us.
Hi Nick, The geolocation documentation you provided is for mobile devices with GPS hardware. Does the Fire TV support it? Also, as far as I can tell, the API returns position information (latitude and longitude), but no country code. So to use this information we'd have to figure out the range of longitudes and latitudes for the U.S. and its territories to see if the user is within the right geographical areas. Is there no simpler way to tell in which country the user registered his Fire TV box/stick? Thanks.
I am testing accessing the geolocation data on the Fire TV, but when I run the app in the web app tester and the app tries to call the navigator.geolocation.getCurrentPosition() function, the app crashes. I really don't need or want to know exactly where the device is, just what country the device is assigned to. Somehow the device knows which country the user's account is associated with, without having to use location-based services. Isn't there any way for an app to know in which country the device is registered?
Since the dingus doesn't have a GPS, the location apps aren't gonna work, but you can get the location from IP which is pretty accurate. Maxmind has free databases which are pretty close on a city level. Well good enough to tell you what country they're in anyway.
https://www.maxmind.com/en/open-source-data-and-api-for-ip-geolocation Message was edited by: Sinistar