Hello,
What system setting changes when going abroad?
I want to disable flows when in another country., so I want a trigger that's definitely due to being in a different country. There's many country related settings to choose from. Some I think are to do with my language settings.
I think it's 'country_code'. Currently set at 011 for Great Britain.
Any help would be appreciated.
Micky
Going abroad trigger
Moderator: Martin
Re: Going abroad trigger
I can't find any value for that. But if you SIM Card abroad, you can init Variables Phone Info, and take the {network_country_iso}. In my case, Indonesia is id.
The other way if you have internet connection, you can init your current location and check the address using API. example here to init city : viewtopic.php?f=5&t=7457&p=21779&hilit=init+city#p21779
You can get the country by js["address"]["country"] or js["address"]["country_code"].
I do have some flow which I want to disable when I am on trip (not necessary abroad). I create Flow timer, which allow me to register some flows, and choose to disable/enable them for a set period of time, before it auto enabled/disabled back. This way, I don't afraid that I forgot to enable back the flows those I disabled before going for the trip.
The other way if you have internet connection, you can init your current location and check the address using API. example here to init city : viewtopic.php?f=5&t=7457&p=21779&hilit=init+city#p21779
You can get the country by js["address"]["country"] or js["address"]["country_code"].
I do have some flow which I want to disable when I am on trip (not necessary abroad). I create Flow timer, which allow me to register some flows, and choose to disable/enable them for a set period of time, before it auto enabled/disabled back. This way, I don't afraid that I forgot to enable back the flows those I disabled before going for the trip.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Re: Going abroad trigger
Hello
The problem with the phone info is that it doesn't have a trigger.
I have 6 flows watching for system setting changes. One of them should give a result.
cmc_country_code
country_code
homecity_timezone
homecity_timezone_city
system_locales
wifi_wcm_country_code_from_scan_result
I think the homecity ones won't change.
My money is on country_code.
The thing about your timer method is that it's universal. My idea is to have a bespoke setup for each country.
I'll know the results soon.
Micky
The problem with the phone info is that it doesn't have a trigger.
I have 6 flows watching for system setting changes. One of them should give a result.
cmc_country_code
country_code
homecity_timezone
homecity_timezone_city
system_locales
wifi_wcm_country_code_from_scan_result
I think the homecity ones won't change.
My money is on country_code.
The thing about your timer method is that it's universal. My idea is to have a bespoke setup for each country.
I'll know the results soon.
Micky
Crude but it works.
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Re: Going abroad trigger
Hello
None of mine triggered.
Yours did. I use Mobile Data Type as the trigger as it seems to always drop the data connection when changing networks as the country changes.
Thanks for your help.
Micky
None of mine triggered.
Yours did. I use Mobile Data Type as the trigger as it seems to always drop the data connection when changing networks as the country changes.
Thanks for your help.
Micky
Crude but it works.