How to detect device information

Hi, I’m trying to understand how to get Country Code Of Device… and other info for example, android version, device time zone… etc…
Thanks for the attention.
I apologize in advance if I didn’t post in the correct channel.

You may want to post on the Weekdays, since the people that are good at helping are online during the weekdays, not weekends. (Weekends include holidays).

1 Like

Please read through the entire post before responding

Hi, @lorenzofaverijfd3b Welcome to the Community!

Please check out these links on how to post in the future: How to ask Great Questions v2.0 + Community Guidelines

To answer your question, try using these blocks :arrow_down:

You can also try using the Time and Date inputs :arrow_down:



2 Likes

Hi, you’re right, I’ll keep that in mind.
sorry, :slightly_smiling_face:

ok, I found this section and used it. I would like to know in which country and region the device is set. to be able to set the correct translation of the app.
I also searched, but unlike other platforms, similar (BUT NOT THE SAME TO THUNKABLE), it doesn’t seem to support the function I was looking for. Or rather I couldn’t find it.
Thanks for your attention anyway. :slightly_smiling_face:

1 Like

I don’t really know, but I have an idea: maybe what we can do is to show a screen showing countries of the world in buttons. It’s like a please select your country screen, showing country options like Afghanistan, Albania, Algeria, Andorra, Angola, Antigua and Barbuda, etc. Then with the selected country option, you can use the correct translation option. E.g. if the user selects the USA then you can use the correct translation for the United States (i.e. American English).

If that’s not what you want, please tell me.

@lorenzofaverijfd3b, try using the location tab? I’m not in front of a computer right now, so I’m not sure if there are blocks that can see location, though I think there are some, since I know some Thunkable Apps, use the devices location.

You may need a Google Map API to track a device location.

Also look at this topic as a reference; Get Current Location with Location Sensor

@lorenzofaverijfd3b, try using these blocks! (You will need a google map API) :arrow_down:
image

Also look here:

@emlee703
So how do I get the country someone’s in from the Google Map API?
Or maybe that second picture means I should use the “language” section in the last block of the picture you posted. Because it shows the English accent that I can use for a translator.

I don’t have a Google Map API, but I would assume that the API would take the location, and use the coordinates to figure out what country the user is in, and then you can use blocks to set the language, to where they are…

I assume this. Remember, I don’t have a Google Map API key. Try to do some more research to find out.

Thank you all for your help, some clarifications.

  • the last block posted in the image above by @emlee703, according to the documentation says: “An optional parameter that specifies the preferred language for the results, ensuring that place names, descriptions, and other information are presented in the user’s preferred language. See here for a list of supported languages:”
  • at the moment the best solution is to ask the user, because even if I knew the location of the device, I wouldn’t really know the language installed on the device. Let me explain with an example. I live in Italy and consequently I set my device to “IT”, now if I went to Japan and wanted to install an app with geolocation to automatically set the language, I would go crazy just figuring out how to change the settings.
    I’ll try to point it out as a feature to add.

Good point! Like your idea!

I think however the “Translate” button should be in the language of the country, so if you were in Italy, and it was in English, at least the “Translate” button is in Italian so you can find it.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.