How to assign current City/State/Province to a variable?

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
dragon
Posts: 29
Joined: 10 Sep 2015 08:13

How to assign current City/State/Province to a variable?

Post by dragon » 05 Jul 2018 02:17

What would be an efficient flow to assign the current City/State/Province to a variable?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: How to assign current City/State/Province to a variable?

Post by Desmanto » 05 Jul 2018 06:07

Do you mean to retrieve your current location's city? You can use openmap API. There is similar thread for this : viewtopic.php?f=5&t=7457

Just look for which administrative level you need.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply