CS 2340

User Stories
Overview
Spotify Wrapped
Artist Recommendations
Duo-Wrapped
Universal Sign-in
View Public Spotify Wraps
Special Holiday Wrapped
User Story #1
Personal Spotify Music Tastes in Fun and Colorful Ways
For User Story #1, we aimed to create an engaging and visually appealing presentation of a user's personal Spotify music listening tastes. This feature allows users to log into their Spotify accounts and view a detailed summary of their listening habits, presented in colorful and interactive formats
​
Implementation
To achieve this, we designed a login functionality that securely connects the app to Spotify's API. This allows users to enter their Spotify credentials and gain access to their personal music data. Once logged in, our code parses the user's account information, extracting key details about their listening habits, such as favorite artists, genres, and top tracks. By doing this, we provided a fun and personalized experience that allows users to explore and understand their Spotify music preferences with ease.
User Story #2
Create an Account and View Past Spotify Wrapped Summaries

User Story #2 focuses on allowing users to create accounts and log into the app, enabling them to view their past Spotify Wrapped summaries. This feature helps users maintain a history of their Spotify Wrapped results and access them through a dedicated interface.
​
Implementation
The code snippet demonstrates the creation of an account system using Firebase Authentication and Firestore. The code uses Firebase Authentication to create a new user account. It prompts the user to enter their email, password, name, and username. The `createNewUser` function ensures proper validation, including matching passwords, and provides feedback through `Toast` messages. If successful, it creates a Firebase user and adds user information to Firestore. The account information is stored in Firestore, ensuring persistence even after the app is closed. The `addUserToFirestore` function stores user data in a `users` collection, allowing for retrieval later. The `sendEmailVerification` method and `updateUI` function demonstrate the ability to update and verify user login information. This allows users to maintain accurate account details and receive verification emails. This implementation provides a robust account creation and management system. Users can log into the app to access their past Spotify Wrapped summaries and maintain their account information. The integration with Firebase ensures data persistence and security.
Custom User Stories (1 & 2)
Granting Friends Access to Spotify Wrapped and Duo-Wrapped
This set of user stories revolves around enabling users to share their Spotify Wrapped summaries with friends and invite friends to join a Duo-Wrapped experience, allowing them to compare music tastes in creative ways.
​
Implementation
The objective here is to allow users to grant their friends viewing access to their Spotify Wrapped summaries. While the code doesn't explicitly show the mechanism for granting access, this can typically be achieved through a user interface with sharing capabilities.
The Inviting Friends to Join a Duo-Wrapped feature allows users to invite friends to join a Duo-Wrapped experience, where they can compare their music tastes. The `DuoWrappedDisplay` activity demonstrates how this can be implemented:
​
In order to compare music tastes, the code fetches the top songs and artists for two users. Methods like `getUserTopSongs` and `getUserTopArtists` retrieve this data through API requests to Spotify. This allows for a direct comparison of music tastes.
​
To determine how similar two users' tastes are, the `calculateSimilarityScore` method compares their top songs and artists. It converts the lists to sets for efficient comparison and calculates the similarity score based on common songs and artists.
​
The `updateUI` method showcases how you display the combined data, including shared top songs and artists, along with the similarity score. The code structure allows for flexibility in presenting this information through text views or other UI elements. Additionally, this implementation includes a `homeBtn` to navigate to the home screen, and the intent structure suggests a way to manage different user interfaces for interactions like inviting friends and viewing Duo-Wrapped data.
​
Together, these features offer a comprehensive solution for sharing Spotify Wrapped data and enabling collaborative music experiences through Duo-Wrapped. By meeting the user stories, the code provides a solid foundation for engaging and creative interactions around Spotify music tastes.
Custom User Story (4)
Spotify Wrapped and Song Clips
Song Clips in Spotify Wrapped
For enhanced user interaction, we integrated music playback to play clips from the user's top songs during their Spotify Wrapped summary. Given Spotify API's limitations, this required at least one member to have Spotify Premium. This feature allowed users to enjoy a more immersive experience, hearing snippets of their favorite tracks. Additionally, this functionality was extended to Duo-Wrapped, enabling shared music playback between two users.
These implementations offered a fun and engaging way for users to enjoy their Spotify Wrapped, with special holiday themes and audio playback to create a richer experience.
Custom User Story (8)
Timespan Control for Wrapped
​
Control the Timespan of Wrapped Summaries
This feature gives users the flexibility to generate Spotify Wrapped summaries over different timespans, allowing them to tailor their reports to specific periods. Users can choose from preset timespans such as 1 week, 1 month, 1 year, or all-time. This flexibility lets them focus on different phases of their music listening journey.
Implementation:
By adjusting data queries and filters, our code enables dynamic selection of timespans. This ensures that users can view their music trends based on the chosen period. This functionality enhances user control over Wrapped summaries, providing customizable insights into their listening habits.
Touch Notifications
Users receive touch notifications when someone comments on their post, keeping them updated on interactions.
With these features, the implementation brings an interactive element to Spotify Wrapped, encouraging users to share, engage, and discover new music through community interactions.
Custom User Story (11)
Exporting Spotify Wrapped as an Image
​
Exporting Spotify Wrapped as an Image
This feature allows users to export a summary of their Spotify Wrapped as an image file, making it easier to share their music summaries with others outside the app. Users can generate a visual representation of their Spotify Wrapped summary and export it as a PNG or JPEG file. This functionality lets users share their Wrapped with friends, post on social media, or use it for other purposes.
These features offer a developer-focused approach to code stability with CI/CD, and a user-friendly method to share Spotify Wrapped in a visually appealing format.
Custom User Story (12)
Firebase Cloud Storage for Multi-Device Sign-In
Firebase Cloud Storage for Multi-Device Sign-In
To allow users to sign into their accounts from any device, this feature utilizes Firebase cloud storage instead of SQLite. This approach ensures that user data is stored securely in the cloud, providing flexibility for accessing accounts from different devices.
Secure Authentication
Firebase Authentication is used to manage user sign-ins. It provides secure login mechanisms and supports various authentication methods, such as email/password, Google, Facebook, and others.
Cross-Device Accessibility
By leveraging Firebase cloud storage, users can sign into their accounts from different devices without losing any data. This feature enhances user experience by providing a unified account experience across devices. This feature is crucial for modern applications, offering users the ability to access their accounts from various devices while ensuring data consistency and security.
​
​
​