You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to keep track of being in foreground using LifecycleResumeEffect in the Theme.
Keep track of foreground/resume with lifecycle observer in Theme
When creating a HttpClient, provide a callback that evaluates the foreground information from the lifecycle observer and start the TrustCertificateActivity whenever DAVx5 is in foreground. The notification should always be shown, using the standard DAVx⁵ way of creating notifications.
We still have to find a good place to put the methods in. Maybe some cert4android integration class, which is then referenced both from the theme and the callback that is provided by HttpClient to cert4nadroid?
Another advantage would be that the UI of cert4android would become more modular, so that a later point we maybe don't need the TrustCertificateActivity anymore, but could just provide a Composable thats then used by the calling app in its navigation hierarchy whenever needed.
The text was updated successfully, but these errors were encountered:
Keep appInForeground as it is, but not set when HttpClient is created, but by a flag that is dynamically changed by lifecycle observers in the theme. Then we would already get the desired behavior.
Another PR: the thing with the cert4android change (that it doesn't do the UI) for better architecture.
Currently, the cert4android
TrustCertificateActivity
doesn't always appear automatically, but only when theHttpClient
is set to "in foreground".This amplifies the problem mentioned here: #1294 (comment)
It should be possible to keep track of being in foreground using LifecycleResumeEffect in the Theme.
HttpClient
, provide a callback that evaluates the foreground information from the lifecycle observer and start theTrustCertificateActivity
whenever DAVx5 is in foreground. The notification should always be shown, using the standard DAVx⁵ way of creating notifications.inForeground
of HttpClient can be droppedWe still have to find a good place to put the methods in. Maybe some cert4android integration class, which is then referenced both from the theme and the callback that is provided by HttpClient to cert4nadroid?
Another advantage would be that the UI of cert4android would become more modular, so that a later point we maybe don't need the
TrustCertificateActivity
anymore, but could just provide a Composable thats then used by the calling app in its navigation hierarchy whenever needed.The text was updated successfully, but these errors were encountered: