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 listening stats not sending the device id #239

Merged
merged 2 commits into from
Aug 16, 2022
Merged

Conversation

geekygecko
Copy link
Member

This change fixes the listening stats on Android, in the current release any new Android stats aren't being added to the user's summary.

When I removed adding the device ID as part of another fix I broke the syncing of stats. The User Sync API requires the unique device ID (a random UUID). It's used to store the stats for the current device and will keep overwriting the stats values for this device. As the device ID was no longer being sent, the device ID was empty in the database. Empty device IDs are ignored when getting the stats summary from the server, so it's the same as not sending them to the server.

Fixes #238

Test Steps

  1. Logout of your account and clear the apps data.
  2. Create a new account.
  3. Play an episode to create some listening stats.
  4. On the Profile tab, tap the "Refresh now" button to manually sync the new stats.
  5. Login to the staging Web Player and view the stats https://play.pocketcasts.net/stats

If this is working correctly the stats from Android should be appearing.

@geekygecko geekygecko requested a review from a team as a code owner August 15, 2022 06:21
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.

Stats matched on the web player and android app. Thanks for the fix!

@ashiagr ashiagr merged commit fe9c8be into main Aug 16, 2022
@ashiagr ashiagr deleted the fix/sync-listening-stats branch August 16, 2022 05:26
@ashiagr ashiagr added this to the 7.21 ❄️ milestone Sep 5, 2022
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

Successfully merging this pull request may close these issues.

Listening stats stuck at 319 days
2 participants