Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ Always return an empty server_to_phone response #978

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

shankari
Copy link
Contributor

We don't actually use the server_to_phone response on the phone since we always retrieve data from the server. This comments out the data that is returned from the server so that we don't waste time reading data that we don't use.

We still get the calls as a coarse ping to know that the app is installed and is working correctly, even if the user is not contributing data. But we don't burn up bandwidth reading unused data from the server.

This cleanup is part of removing the NEW_DATA implicit intent e-mission/e-mission-docs#1079 (comment)

Testing done:

  • Before: 08-27 17:26:02.802 11959 12158 I CommunicationHelper: Result Summary JSON = {"server_to_phone": [{"metadata": {"write_ts": 1687907246.5748034, "type": "document", "key": "diary/trips-2016-07-27"}, "data": [{"type": "FeatureCollection", "properties": {"source": "DwellSegmentat length 295649
  • After: 08-27 18:39:10.918 15925 16081 I CommunicationHelper: Result Summary JSON = {"server_to_phone": []}

We don't actually use the server_to_phone response on the phone since we always
retrieve data from the server. This comments out the data that is returned from
the server so that we don't waste time reading data that we don't use.

We still get the calls as a coarse ping to know that the app is installed and is
working correctly, even if the user is not contributing data. But we don't burn
up bandwidth reading unused data from the server.

This cleanup is part of removing the NEW_DATA implicit intent
e-mission/e-mission-docs#1079 (comment)

Testing done:
- Before: `08-27 17:26:02.802 11959 12158 I CommunicationHelper: Result Summary JSON = {"server_to_phone": [{"metadata": {"write_ts": 1687907246.5748034, "type": "document", "key": "diary/trips-2016-07-27"}, "data": [{"type": "FeatureCollection", "properties": {"source": "DwellSegmentat length 295649`
- After:  `08-27 18:39:10.918 15925 16081 I CommunicationHelper: Result Summary JSON = {"server_to_phone": []}`
shankari added a commit to shankari/cordova-server-sync that referenced this pull request Aug 28, 2024
…erver

- The intent does not have the package configured like all the other explicit intents
- The intent is currently unused since we do not read any data from the local cache
- Note that since we don't read any data from the local cache, we can also just
  stop returning any data from the server, and reduce power and data consumption.
  That is implemented in the related PR: e-mission/e-mission-server#978
shankari added a commit to shankari/e-mission-phone that referenced this pull request Aug 29, 2024
Data collection:
⬆️  foreground service permissions + restricted broadcast event
https://github.com/e-mission/e-mission-data-collection/releases/tag/v1.8.9

Server communication:
🔊 if parsing response as JSON fails, include the raw response
https://github.com/e-mission/cordova-server-communication/releases/tag/v1.2.7

Local notifications:
⬆️ API 34: inexact alarms + immutable notifications
https://github.com/e-mission/cordova-plugin-local-notification-12/releases/tag/0.1.5-remove-exact-alarms

Server sync:
🔥 Remove the NEW_DATA broadcast intent when we pull data from the server
https://github.com/e-mission/cordova-server-sync/releases/tag/v1.3.3

Related server PR:
⚡️ Always return an empty server_to_phone response
e-mission/e-mission-server#978

+ Bump up version numbers
idillon-sfl pushed a commit to FabmobQC/mamobilite that referenced this pull request Sep 4, 2024
Data collection:
⬆️  foreground service permissions + restricted broadcast event
https://github.com/e-mission/e-mission-data-collection/releases/tag/v1.8.9

Server communication:
🔊 if parsing response as JSON fails, include the raw response
https://github.com/e-mission/cordova-server-communication/releases/tag/v1.2.7

Local notifications:
⬆️ API 34: inexact alarms + immutable notifications
https://github.com/e-mission/cordova-plugin-local-notification-12/releases/tag/0.1.5-remove-exact-alarms

Server sync:
🔥 Remove the NEW_DATA broadcast intent when we pull data from the server
https://github.com/e-mission/cordova-server-sync/releases/tag/v1.3.3

Related server PR:
⚡️ Always return an empty server_to_phone response
e-mission/e-mission-server#978

+ Bump up version numbers
@shankari shankari merged commit 204cec1 into e-mission:master Sep 15, 2024
5 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant