feat(android): share podcast playback and foreground broadcasting
Add native Camera2 capture, MPEG-TS segmentation and foreground service with notification stop. Reuse shared authenticated uploads and replay finalization, add capture regression tests and document platform limitations. Update Avalonia to 12.1.4. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
2dcbcd35b3
commit
ad92744a94
24 changed files with 1495 additions and 70 deletions
|
|
@ -25,6 +25,7 @@ public class MainActivity : AvaloniaMainActivity
|
|||
/// The current MainActivity instance.
|
||||
/// </summary>
|
||||
public static MainActivity? Current { get; private set; }
|
||||
internal static bool IsForeground { get; private set; }
|
||||
|
||||
protected override void OnCreate(global::Android.OS.Bundle? savedInstanceState)
|
||||
{
|
||||
|
|
@ -36,8 +37,8 @@ public class MainActivity : AvaloniaMainActivity
|
|||
EmojiCompat.Config config = new FontRequestEmojiCompatConfig(this, fontRequest);
|
||||
EmojiCompat.Init(config);
|
||||
PlatformBootstrap.InitPlatform();
|
||||
base.OnCreate(savedInstanceState);
|
||||
Current = this;
|
||||
base.OnCreate(savedInstanceState);
|
||||
}
|
||||
/// <summary>
|
||||
/// Receives the deep-link Intent fired by the system browser after the
|
||||
|
|
@ -60,9 +61,34 @@ public class MainActivity : AvaloniaMainActivity
|
|||
|
||||
}
|
||||
|
||||
public override void OnRequestPermissionsResult(int requestCode, string[]? permissions, Permission[]? grantResults)
|
||||
protected override void OnStop()
|
||||
{
|
||||
if (PostIt.Android.Services.AndroidCurrentLocationProvider
|
||||
PostIt.Services.Platform.SuspendPlayback();
|
||||
base.OnStop();
|
||||
}
|
||||
|
||||
protected override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
IsForeground = true;
|
||||
}
|
||||
|
||||
protected override void OnPause()
|
||||
{
|
||||
IsForeground = false;
|
||||
base.OnPause();
|
||||
}
|
||||
|
||||
protected override void OnRestart()
|
||||
{
|
||||
base.OnRestart();
|
||||
PostIt.Services.Platform.ResumePlayback();
|
||||
}
|
||||
|
||||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
|
||||
{
|
||||
if (PostIt.Android.Services.PodcastPermissions.HandleResult(requestCode, permissions, grantResults)
|
||||
|| PostIt.Android.Services.AndroidCurrentLocationProvider
|
||||
.HandlePermissionResult(requestCode, grantResults))
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue