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

Application get sometimes killed during playback #136

Open
Chralu opened this issue Dec 23, 2024 · 2 comments
Open

Application get sometimes killed during playback #136

Chralu opened this issue Dec 23, 2024 · 2 comments

Comments

@Chralu
Copy link
Contributor

Chralu commented Dec 23, 2024

This is related to #120

Describe the bug

When playing a podcast, OS may decide to kill AnytimePodcast after a while.

Logs on Android

12-23 09:43:12.858  1494 10583 W ActivityManager: Background started FGS: Disallowed [callingPackage: uk.me.amugofjava.anytime; callingUid: 10170; uidState: SVC ; intent: Intent { cmp=uk.me.amugofjava.anytime/com.ryanheise.audioservice.AudioService }; code:DENIED; tempAllowListReason:<null>; targetSdkVersion:34; callerTargetSdkVersion:34; startForegroundCount:1; bindFromPackage:null]
12-23 09:43:12.874  1494 10583 W ActivityManager: startForegroundService() not allowed due to mAllowStartForeground false: service uk.me.amugofjava.anytime/com.ryanheise.audioservice.AudioService
12-23 09:44:08.080  1494  1710 W ActivityManager: Stopping service due to app idle: u0a170 -26m55s672ms uk.me.amugofjava.anytime/com.ryanheise.audioservice.AudioService
12-23 09:53:15.764  1494  1710 I ActivityManager: Killing 13748:uk.me.amugofjava.anytime/u0a170 (adj 700): excessive cpu 61690 during 300001 dur=607700 limit=10
12-23 09:53:16.055  1494  2110 I WindowManager: WIN DEATH: Window{c66c7df u0 uk.me.amugofjava.anytime/com.ryanheise.audioservice.AudioServiceActivity}
12-23 09:53:16.055  1494  1614 I MediaSessionStack: removeSession | record: uk.me.amugofjava.anytime/media-session (userId=0)
12-23 09:53:16.095  1494  1709 W UsageStatsService: Unexpected activity event reported! (uk.me.amugofjava.anytime/com.ryanheise.audioservice.AudioServiceActivity event : 23 instanceId : 107590840)

Smartphone :

  • iPhone 8 (iOS 16)
  • Fairphone3 (Android 13)
@Chralu
Copy link
Contributor Author

Chralu commented Dec 23, 2024

@amugofjava
Copy link
Owner

One of the suggested resolutions was to use the audio_service package in order to obtain a foreground service, which Anytime does use.

When you pause an episode it does make Anytime eligible for killing. I think this is fine, but what Anytime needs to do is be better at recovering. Often it will show the episode that was playing before being killed, but not always.

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

No branches or pull requests

2 participants