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

Fix up playback service on wear #882

Merged
merged 3 commits into from
Apr 18, 2023
Merged

Fix up playback service on wear #882

merged 3 commits into from
Apr 18, 2023

Conversation

mchowning
Copy link
Contributor

Description

It seems that I left more than a few loose ends when I switched the watch app away from media3 to using the same playback setup as the phone app. The biggest thing I missed was updating the service declaration in wear's manifest file. This meant that the OS wasn't being informed when Pocket Casts was performing playback.

Less critically, I left the old service file and all of the DI setup for it. This PR cleans that up since we'll just switch this to media3 when we do the switch with the phone app.

Note
This PR builds on top of #881, so we probably want to merge that one first.

Testing Instructions

  1. Start playing an episode on a pixel watch/emulator
  2. Go to the watch's home screen
  3. Observe that the playback icon is active (see screencast below)

Screenshots or Screencast

Screen.Recording.2023-04-13.at.9.21.42.PM.mov

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews

<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this POST_NOTIFICATIONS permission to stay consistent with the phone app. The other changes to the permissions are just reordering them to be alphabetical.

@mchowning mchowning marked this pull request as ready for review April 14, 2023 01:26
@mchowning mchowning requested a review from a team as a code owner April 14, 2023 01:26
Copy link
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The biggest thing I missed was updating the service declaration in wear's manifest file.

I, too, share the responsibility for not noticing it.

I confirm that the playback icon is active on watch's home screen when media is playing.

Base automatically changed from update/wear-network-call-factory to main April 18, 2023 07:19
ashiagr added 2 commits April 18, 2023 12:50
# Conflicts:
#	wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/di/ViewModelModule.kt
@ashiagr ashiagr merged commit be74a5b into main Apr 18, 2023
@ashiagr ashiagr deleted the update/clean-up-wear-service branch April 18, 2023 07:51
@mchowning mchowning added the [Area] Wear OS watch app label Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants