Sending remote config 'monitoring': 2 generates too many updates
See original GitHub issue- App build number: 2.1.3 (21302)
- Android version: 10 QKQ1.190828.002
- Device: Xiaomi Mi 8
I’m running owntracks android client in HTTP mode with remote commands enabled, since I want all devices to use 'monitoring': 2
, I thought it could be a good idea to have the HTTP server send back just that option to clients to always ensure consistent configuration, so I put the following lines in the server PHP code:
$response = array();
$response['_type'] = "cmd";
$response['action'] = 'setConfiguration';
$response['configuration'] = array();
$response['configuration']['_type'] = 'configuration';
$response['configuration']['monitoring'] = 2;
print json_encode($response);
This does indeed set the desired client monitoring mode, however if I leave that enabled, clients start sending lots of updates (up to 2-3 per second). As soon as I comment the last line above, clients go back to regular ~15-30 seconds updates. Is this expected? My intention with the above code was to fix the client config if it’s not correct, and do nothing on clients that are already configured correctly.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
Firebase Remote Config loading strategies - Google
Firebase Remote Config loading strategies · Strategy 1: Fetch and activate on load · Strategy 2: Activate behind loading screen · Strategy 3:...
Read more >Monitoring Changes In Firebase Remote Config Using Kotlin ...
Learn to write a Google Cloud Function using Kotlin which monitors for changes in Firebase Remote Config and sends a formatted notification to...
Read more >Feature flagging with Remote Config and Google Analytics
In this third video of the Firebase Codelang series, Andrea Wu will show you how to use Firebase Remote Config and Google Analytics...
Read more >How to use Unity's Remote Config - Simple Talk
You can use Unity's Remote Config utility to update settings for users. Lance Talbert walks you through using the utility including a JSON ......
Read more >Intro to mobile device management profiles - Apple Support
MDM capabilities include updating software and device settings, monitoring compliance with organizational policies, and remotely wiping or ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, I think I narrowed this down to an event that fires indiacting that the monitoring changed whenever the preference setter was called. Obviously, this got called regardless of what the current value was, and that event triggered a few things, including setting up a new Location listener. In turn, this could then turn into a feedback loop.
Should now only trigger that event if the monitoring mode actually changes. Will be in 2.2.1.
I’m having real trouble replicating this.
With locator interval at 60 and move mode locator interval at 10. In significant mode I get updates every 30 seconds, which fits the pattern seen on recent Android versions and
FusedLocationClient
settings. It’s at least every 60 seconds. If I switch to move mode in app, I get updates every 5 seconds.I see the same behaviour if I switch using a
cmd
message of'{"_type":"cmd", "action":"setConfiguration", "configuration": {"_type": "configuration", "monitoring": 2}}'
Are you expecting to receive location updates no more frequently than
locatorInterval
/moveModeLocatorInterval
? Is the problem that updates are faster than specified?