-
Notifications
You must be signed in to change notification settings - Fork 88
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
Research spike on running in the background continuously on Android #916
Comments
Our ideas for things to look into:
|
I think we should start with getting more information and control over our Threads - I've got some ideas on how to achieve that |
I set up workers which runs every 15 minutes (starting in 10 minutes from the app start). They display information about backend process status. If data port is no longer occupied, worker should trigger a push notification informing that app no longer works |
We want to confirm workers works in a desired way (they are capable of performing some work when backend thread is dead) and then find a way to gather similar information about tor process status within the same worker |
Notifications triggered from worker may need access to UI thread as they appear randomly when the app is being re-started or phone being unlocked. It'd be good to check that by reading documentation... |
I received the notification but app seemed to keep working so maybe checking data server port occupancy is not good enough |
I think the good idea may be to dump workers logs into a file and gather them for some time to have the overall picture of what happens to the app and it's threads |
I added dumping worker logs to a file. To upload this file from android device to your local file system run |
According to documentation, workers should work under every circumstances but in practise it's not so straightforward https://stackoverflow.com/questions/50682061/android-is-workmanager-running-when-app-is-closed |
Force stopping the app (which is basically killing its process) results in erasing queued works, which means workers won't work until user starts the app again. Usually it's user's decision to perform a force stop, but different manufacturers provides their own practises of managing resources... |
Workers seems to run reliably every 15 minutes but the question is are there situations where workers run but backend and tor are dead? (edit: yes) If so, we may be able to bring them back with the help of workers |
I've been testing workers during the night and those are my observations:
|
Can we run backend in workers? Or start it with workers? |
Note: we treat user story 4 as a separate issue #985 |
Goal: The Android app runs in the background well enough to send files, reliably receive notifications without a push notification service, and provide “liveness” to the network.
We should do some research to see how we can achieve these things. The end result of this ticket is a list of approaches we have proven do not work and a proposal for how to proceed.
User story 1: “The Manager”: a manager wants to be able to provide quick responses to her team when they mention her. If the notification does not always arrive quickly, she cannot use Quiet. Quiet should always receive incoming notifications, without a push notification service.
User story 2: “The Always-on Phone”: a team wants to make sure there is always a place to sync messages, but they don’t have a spare computer to use, so they join the network on an Android phone and leave that phone plugged in 24/7. That phone should remain reliably connected to the network.
User story 3: “Sending an image”: a user takes a photo, sends it with Quiet to others in their team, and puts their phone in their pocket. The photo is important and must be delivered to all online users.
User story 4: "Never opening the app again": a user installs Quiet, joins a community, but restarts their phone and forgets to open the app ever again. Someone else sends them a message in the community. Will they ever see it?
IDEAS FROM BRAINSTORM:
The text was updated successfully, but these errors were encountered: