feat(postit): keep Android SignalR chat in background without ongoing notification
Share the chat transport between UI, calls and an opt-in background service. Restore account rooms and attempt boot restart, keeping event alerts independent from connection permissions. Document Android limits and add lifecycle regressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
a39c3912ea
commit
311d55dcc6
32 changed files with 2210 additions and 143 deletions
|
|
@ -79,6 +79,17 @@ public class MainActivity : AvaloniaMainActivity
|
|||
base.OnPause();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
if (ReferenceEquals(Current, this))
|
||||
{
|
||||
Current = null;
|
||||
IsForeground = false;
|
||||
PostIt.Android.Services.NotificationPermission.OnActivityDestroyed();
|
||||
}
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
protected override void OnRestart()
|
||||
{
|
||||
base.OnRestart();
|
||||
|
|
@ -87,7 +98,8 @@ public class MainActivity : AvaloniaMainActivity
|
|||
|
||||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
|
||||
{
|
||||
if (PostIt.Android.Services.PodcastPermissions.HandleResult(requestCode, permissions, grantResults)
|
||||
if (PostIt.Android.Services.NotificationPermission.HandleResult(requestCode, permissions, grantResults)
|
||||
|| PostIt.Android.Services.PodcastPermissions.HandleResult(requestCode, permissions, grantResults)
|
||||
|| PostIt.Android.Services.AndroidCurrentLocationProvider
|
||||
.HandlePermissionResult(requestCode, grantResults))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue