Store GSM cells at Wi-Fi
Moderator: Martin
Store GSM cells at Wi-Fi
Here my group of flows
It stores a CID of GSM cell in a list if phone connected to any Wi-Fi network
You can use it in your flows if want enable wi-fi atomatically only where it avalible
Flows:
Cell at Wi-Fi - main flow, stores and removes cell's CID from list according to connected wi-fi or not.
Check enable - disables main flow when Wi-Fi is set to off. Just to reduce battery usage
Clear unused pending - it removes old unfinished records
Global variables:
global_current_cid - current cell's CID
global_wifi_cells - list of cell's CID where Wi-Fi avalible
global_wifi_name_cells - map with wi-fi name associated with cell's CID
global_wifi_cells_delete_pending - store how many time (x10s) Wi-Fi was unavalible, delete when reach 160s
global_wifi_cells_add_pending - store how many time (x10s) Wi-Fi was avalible, delete when reach 70s
Install:
Just import flows
Note:
I have to use trigger "Phone Cell GSM: Disconnected to CIDs { global_current_cid }" because it is the only way to trigger on every cell change.
There is an "WiFi Connected" condition in main flow - it is black list for Wi-Fi names. You can add there your mobile Wi-Fi names, like notebook hotspot, other Android WiFi hotspot or mobile Wi-Fi modem
Last version: http://automagic4android.com/forum/view ... 490#p10490
It stores a CID of GSM cell in a list if phone connected to any Wi-Fi network
You can use it in your flows if want enable wi-fi atomatically only where it avalible
Flows:
Cell at Wi-Fi - main flow, stores and removes cell's CID from list according to connected wi-fi or not.
Check enable - disables main flow when Wi-Fi is set to off. Just to reduce battery usage
Clear unused pending - it removes old unfinished records
Global variables:
global_current_cid - current cell's CID
global_wifi_cells - list of cell's CID where Wi-Fi avalible
global_wifi_name_cells - map with wi-fi name associated with cell's CID
global_wifi_cells_delete_pending - store how many time (x10s) Wi-Fi was unavalible, delete when reach 160s
global_wifi_cells_add_pending - store how many time (x10s) Wi-Fi was avalible, delete when reach 70s
Install:
Just import flows
Note:
I have to use trigger "Phone Cell GSM: Disconnected to CIDs { global_current_cid }" because it is the only way to trigger on every cell change.
There is an "WiFi Connected" condition in main flow - it is black list for Wi-Fi names. You can add there your mobile Wi-Fi names, like notebook hotspot, other Android WiFi hotspot or mobile Wi-Fi modem
Last version: http://automagic4android.com/forum/view ... 490#p10490
- Attachments
-
- Cell_at_Wi_Fi.xml
- (19.45 KiB) Downloaded 1327 times
Last edited by Nerey on 19 Jun 2015 05:09, edited 2 times in total.
Sorry for bad english, my native is russian.
Re: Store GSM cells at Wi-Fi
And other thoughts
CID of current cell is not very accurate way to determine position
GPS - very energy-intensive
I thought about using of neighboring_cells, but it don't accurate too
Is there other way?
Or Mike, maybe it is possible to get a map with CIDs and its signal strength?
CID of current cell is not very accurate way to determine position
GPS - very energy-intensive
I thought about using of neighboring_cells, but it don't accurate too
Is there other way?
Or Mike, maybe it is possible to get a map with CIDs and its signal strength?
Sorry for bad english, my native is russian.
Re: Store GSM cells at Wi-Fi
Hi,
where can i see the global variables if the flow "check cell" runs.
At globals vars i dont see all needed vars for all flows.
Thanks.
MacToolz
where can i see the global variables if the flow "check cell" runs.
At globals vars i dont see all needed vars for all flows.
Thanks.
MacToolz
Re: Store GSM cells at Wi-Fi
Hi
All variables must be created automatically when needed
Is there some problems with it?
All variables must be created automatically when needed
Is there some problems with it?
Sorry for bad english, my native is russian.
Re: Store GSM cells at Wi-Fi
Hi,
yes, the problem is i see not the new operator or an assignment.
The flow check all 10s the expression after wifi cinnected etc.
When will the variable generated?
MacToolz
yes, the problem is i see not the new operator or an assignment.
The flow check all 10s the expression after wifi cinnected etc.
When will the variable generated?
MacToolz
Re: Store GSM cells at Wi-Fi
global_current_cid should be generated if WiFi is on and there is cid avalible
global_wifi_cells_add_pending should be created if there is no change in 10 seconds and WiFi name is not in "black" list
global_wifi_cells and global_wifi_name_cells should be created if it is enought to add first cell to list
If it is not, please, try to create blank list global_wifi_cells, global_wifi_cells_add_pending and global_wifi_cells_delete_pending, blank map global_wifi_name_cells
Or in the evening I'll send new version, maybe it can help
global_wifi_cells_add_pending should be created if there is no change in 10 seconds and WiFi name is not in "black" list
global_wifi_cells and global_wifi_name_cells should be created if it is enought to add first cell to list
If it is not, please, try to create blank list global_wifi_cells, global_wifi_cells_add_pending and global_wifi_cells_delete_pending, blank map global_wifi_name_cells
Or in the evening I'll send new version, maybe it can help
Sorry for bad english, my native is russian.
Re: Store GSM cells at Wi-Fi
Try this flows
Added new variable global_wifi_low_priority
You must create list and add there WiFi names in black list
Added new variable global_wifi_low_priority
You must create list and add there WiFi names in black list
- Attachments
-
- Cell_at_Wi_Fi_20150618_185940.xml
- (20.07 KiB) Downloaded 1088 times
Sorry for bad english, my native is russian.
Re: Store GSM cells at Wi-Fi
Hi,
the problem is still limited there. It must all variable that are created are better prepared in an initialization flow.
So you can then export it global variable indirectly.
especially if you are accidentally deletes this not this created.
Variable used in methods are not automaticly created as a new object.
The difference is because the if in a script or wherever held an assignment, they will be created implicitly variable globally.
Is that correct ???
thx
MacToolz
the problem is still limited there. It must all variable that are created are better prepared in an initialization flow.
So you can then export it global variable indirectly.
especially if you are accidentally deletes this not this created.
Variable used in methods are not automaticly created as a new object.
The difference is because the if in a script or wherever held an assignment, they will be created implicitly variable globally.
Is that correct ???
thx
MacToolz
Re: Store GSM cells at Wi-Fi
Sorry, I can't understand you
But you can be sure, when I changed my phone I didn't created any variable but flows work correct
Can you show me log?
But you can be sure, when I changed my phone I didn't created any variable but flows work correct
Can you show me log?
Sorry for bad english, my native is russian.
Re: Store GSM cells at Wi-Fi
Hello,
i have a completely new version. I've completely changed. Can I upload here. There are new flows.
0000_CheckCell Global VAR Init -> you need to make all the needed global variable to declare
000_CheckWidgetAutoCellWifi -> is its own widget where you are stopped in the Main flows
001_Main -> the main flow of all flows managed
002_Check cell -> monitors the location cell
002_Check enable -> monitors the hardware
Then I have another synchronized flow in the Main. From another topic.
When invoked the then all needed modules such as GPS, WLAN, etc. are turned off. If you place all be switched on again.
I have own widget to start and stop the main flow ..
All my processes working without trigger. I am of the opinion that the trigger behave strangely. Partial be trigger again triggered even though the flow is already working.
The complete constellation of the trigger can not cover you. Therefore, these processes are designed and working safely.
Should I flows upload here or create a new topic?
MacToolz
i have a completely new version. I've completely changed. Can I upload here. There are new flows.
0000_CheckCell Global VAR Init -> you need to make all the needed global variable to declare
000_CheckWidgetAutoCellWifi -> is its own widget where you are stopped in the Main flows
001_Main -> the main flow of all flows managed
002_Check cell -> monitors the location cell
002_Check enable -> monitors the hardware
Then I have another synchronized flow in the Main. From another topic.
When invoked the then all needed modules such as GPS, WLAN, etc. are turned off. If you place all be switched on again.
I have own widget to start and stop the main flow ..
All my processes working without trigger. I am of the opinion that the trigger behave strangely. Partial be trigger again triggered even though the flow is already working.
The complete constellation of the trigger can not cover you. Therefore, these processes are designed and working safely.
Should I flows upload here or create a new topic?
MacToolz