Developing a music app for mobile devices Phát triển ứng dụng âm nhạc cho thiết bị di động Developing a music app for mobile devices
INTRODUCTION
Chapter one provides an overview, introducing the reasons for choosing the topic,objectives, scope, and expected outcomes.
THEORY AND TOOLS
Chapter two offers a comprehensive overview of Android operating system programming, outlining essential theories for developing applications using the MVVM model It also introduces the Android Studio IDE, highlights the interface design capabilities of Figma, and discusses the diagramming software Draw.io, providing a solid foundation for app development.
SYSTEM ANALYSIS AND DESIGN
Chapter three delves into the analysis of diagrams such as use case diagrams, sequence diagrams, activity diagrams, and comprehensive and detailed design diagrams.
It also includes the design of the application's interface screens and database design.
PROGRAM DEVELOPMENT
Chapter four focuses on program development, presenting the main functional modules of the system, code snippets, and the method for installing the application.
CONCLUSION
Chapter five summarizes the results achieved after completing the program, highlighting limitations and future development directions.
Chapter II: THEORY AND TOOLS 7
Chapter III: SYSTEM ANALYSIS AND DESIGN 7
CHAPTER II: THEORY AND TOOLS 12
B Flutter: 15 a What is Flutter? 15 b Advantages of Flutter: 15 c Outstanding features of Flutter: 15
2.1.2.2 Introduction to the Dart programming language 16
2.1.3 Theoretical basis for information system analysis and design 19
2.1.3.2 Object-oriented analysis and design concepts 19
2.2.1 Introduction to Android Studio IDE 23
2.2.2 Introduction to the figma interface design tool 23
Some benefits when designing with Figma 24
2.2.3.Introducing the Draw.io diagramming tool 24
CHAPTER III: SYSTEM ANALYSIS AND DESIGN 26
3.1.5 Evaluation of traditional music application systems 29
3.1.6 Plan to build a new system 30
CHAPTER IV SOFTWARE INSTALLATION AND TESTING 62
4.1.1 Bring system data to the deployment environment 62
4.1.2 How to convert download to mp3 62
CHAPTER V CONCLUSION AND DEVELOPMENT DIRECTIONS 88
INTRODUCTION
MOTIVATION CHOOSING THIS TOPIC
Mobile software and applications are diverse across various operating systems, including J2ME, Android, iOS, Hybrid, and Web-based platforms Recently, Android has gained prominence by integrating advanced features and technologies, positioning itself as a strong competitor to earlier systems As a result, Android is increasingly regarded as the future of mobile operating systems, enjoying widespread popularity among users both locally and globally.
Focusing on the target audience and the rapidly evolving market, I have chosen to develop a "Mobile Music App" as my project This initiative aims to enhance my system analysis and design skills, boost my programming abilities, and acquire relevant knowledge, all aligned with my course curriculum By creating a user-friendly application, I intend to meet the increasing demand for mobile entertainment, promote relaxation, and contribute to the growth of Vietnam's electronics sector The market is already filled with popular mobile music apps like Spotify, Zingmp3, Nhaccuatui, and Soundcloud, highlighting the potential for innovation in this space.
TOPIC TARGET
Understanding the initiation and management of an application
❖ Developing software with complete functionality and efficient operation, applying information technology in managing goods for me is called “Hanh music app” or “HAMusic” for short
❖ Using the Dart language and the Flutter framework to create applications for Android;
❖ Researching issues related to Android, Dart, Flutter, and working with
PostgreSQL in mobile application development;
❖ Deploying and installing the program in the Android environment.
LIMITATION
❖ Research and development, specifically focusing on a music streaming application, delving into the study and analysis of an information system to build the application;
❖ Develop software using the MVC model, working with PostgreSQL in mobile software development, and connecting the software to the database via RESTful API;
❖ The program focuses on solving the problem of managing a music streaming application.
EXPECTED RESULTS TO ACHIEVE
The development of the music streaming application is expected to achieve the following results upon completion:
- Successfully create a music streaming application that meets all business requirements.
- Complete the installation of the application with the following main functions:
+ With the music streaming application:
7 - Add or remove songs from playlists
THEORY AND TOOLS
THEORETICAL BASIS
Android Inc., originally a California-based company, developed Android as a mobile operating system utilizing the Linux kernel After Google acquired the company in 2005, it began enhancing the Android Platform, with significant contributions from key figures at Android Inc., including Chris.
White, Nick Sears, Andy Rubin, and Rich Miner.
Notable companies in the mobile device and telecommunications sectors, such as ARM Holdings, Atheros Communications, Google, HTC, Nvidia, Qualcomm, Samsung Electronics, Asustek Computer Inc., Garmin Ltd., Softbank, Sony Ericsson, Toshiba Corp., and Vodafone Group, were members of the Open Handset Alliance.
Alliance as of the end of 2007 The first notable outcome of the Alliance's quick innovation to better meet customer needs is the Android platform.
Android was designed to cater to the needs of device manufacturers, operators, and developers in the mobile industry The first Android smartphone, the T-Mobile G1, was launched by T-Mobile shortly after the release of the initial SDK version in November 2007.
The Android SDK release Candidate 1.0 was then made public by Google Google acquired an open-source license for the Android Platform in October of 2008.
When Android was launched, a key design goal was to facilitate communication between applications and enable resource sharing, including user interfaces and data In late 2008, Google released the Android Dev Phone 1, allowing users to run Android apps without mobile carrier restrictions, thus enabling developers to test their concepts on a genuine Android smartphone Concurrently, Google also released Android version 1.1, which included important bug fixes.
Devices operating on versions 1.0 and 1.1 necessitated a physical keyboard due to the lack of support for soft keyboards In April 2009, Google addressed this issue with the release of SDK 1.5, which introduced enhancements such as improved media recording, widgets, and live folders.
From its conception to a platform that promoted innovation, interoperability, and developer freedom, this trip represents Android's development.
The following model provides a general overview of the components of the Android operating system Each part is detailed as shown in the diagram below.
Figure 2.2 Android system stack structure
What is FrameWork
A framework is a collection of pre-written code that provides a foundational structure along with integrated programming libraries, enabling developers to create dynamic and robust web applications more efficiently These frameworks come equipped with built-in features such as models and APIs, which simplify the development process Utilizing a framework is akin to starting with a pre-built house foundation, allowing you to focus on customizing the structure and interior design to meet your specific needs Various types of frameworks exist, each catering to different development requirements.
- At present, there are no standardized conventions for classifying frameworks. However, for ease of understanding, they can be categorized as follows:
1 By programming language: JavaScript frameworks, HTML & CSS frameworks, NET Framework, etc.
2 By supported operating system: Windows framework, Android framework, iOS framework, etc.
3 By application type: Web framework, Mobile framework, Front-end framework, Back-end framework, etc.
4 Combination categories: such as front-end web framework or Java backend framework.
Mobile application frameworks allow developers to write code once and deploy it across both iOS and Android platforms, significantly reducing development time compared to native code Many of these frameworks primarily utilize JavaScript, with popular examples including Facebook's React Native, Microsoft's Xamarin (which employs C#), and Flutter, which uses the Dart programming language.
Flutter
Google's Flutter is an open-source UI development framework launched in 2017 that allows developers to create visually appealing applications for multiple platforms—desktop, web, iOS, and Android—from a single codebase One of its key features is the use of the Dart programming language, which accelerates development and improves application performance.
Google's Flutter is a mobile UI framework that simplifies the creation of stunning interfaces for both iOS and Android platforms It seamlessly integrates with existing code, making it a valuable tool for developers and businesses alike The advantages of using Flutter include its rapid development capabilities, expressive UI, and the ability to maintain a single codebase for multiple platforms.
Flutter apps deliver performance and user experience comparable to those built with the Android SDK, and with minor adjustments, they are also compatible with iOS devices.
User interfaces created with Flutter deliver superior performance compared to those developed with other cross-platform frameworks like React Native and Ionic, especially at 60 frames per second This exceptional performance makes Flutter a compelling choice for developers seeking to enhance user experience.
1 Dart is a quick, object-oriented language used by Flutter that has a lot of helpful features like mixins, generics, isolates, and static typing.
2 Flutter comes with its own UI elements and a way to render them on iOS and Android devices The majority of UI elements are easily accessible and follow Material Design guidelines.
3 Similar to Android Studio, IntelliJ IDEA is an IDE for developing Flutter applications. c Outstanding features of Flutter:
Flutter's Hot Reload feature enables rapid development by allowing interface updates to appear in milliseconds With a variety of customizable widgets, developers can create interfaces in just minutes Additionally, Hot Reload facilitates quicker feature additions and bug fixes without the need for virtual machines or physical Android/iOS devices.
Flutter provides a rich array of components for creating beautiful user interfaces in both Material Design and Cupertino styles With its extensive motion APIs, smooth scrolling capabilities, and customizable options, Flutter ensures a highly expressive and flexible UI experience.
- Native Performance:Flutter widgets leverage platform differences such as scrolling, navigation, icons, and fonts to deliver optimal performance on both iOS and Android.
Therefore, it's clear why I chose Flutter as the framework for this project:
1 The codebase of Flutter applications tends to be relatively larger compared to other cross-platform frameworks However, utilizing a single codebase saves space and facilitates maintenance Flutter, based on reactive programming, is simpler and more efficient than traditional methods Additionally, Flutter provides various UI components and tools to create visually appealing interfaces with smooth interactions.
2 By allowing developers to code in a single language (Dart) and then compile it for Android and iOS, Flutter streamlines code reuse between the two platforms, making it more accessible and saving development time and resources.
2.1.2.2 Introduction to the Dart programming language
What is a programming language?
Programming languages serve as structured systems of rules and syntax that enable human communication with computers for executing specific tasks They function as a vital link between humans and machines, empowering developers to write code that instructs computers to carry out commands, process data, and develop software applications.
There are many different types of programming languages, each designed to serve specific purposes and domains Some popular programming languages include:
1 Python:Python is widely used in web development, data science, artificial intelligence, and automation It is well-known for its straightforward and simple syntax.
2 Java:As an object-oriented programming language, Java is often used for developing enterprise applications, mobile applications on Android, and large-scale systems requiring stability and scalability.
3 C/C++:These are powerful and efficient programming languages, commonly used in system development, embedded software, gaming, and high-performance applications.
4 JavaScript: Primarily used in web development, JavaScript enables the creation of interactive and dynamic web pages, combined with HTML and CSS to build user interfaces.
5 Dart:A programming language developed by Google, Dart is commonly used alongside Flutter to develop cross-platform applications.
Dart
Google developed Dart, an open-source programming language that emphasizes object-oriented programming with C-like syntax Its robust support for interfaces and classes enhances creative possibilities, making it a versatile choice for building desktop, server, mobile, and web applications.
Dart, developed by Lars Bak and Kasper Lund under Google's management, was introduced at the GOTO conference in Denmark on October 10, 2011, showcasing its significant potential The release of Dart 1.0 on November 14, 2013, marked a crucial milestone, despite initial mixed reactions Dart's evolution continued with the transition from a virtual machine plan in Chrome to compiling Dart code into JavaScript, a significant shift achieved with Dart 2.0 in August 2018, which also included important changes to the type system.
Dart has gone through several versions, with the latest being Dart 3.0, released on May 10, 2023 This version is not just a mere update, but also brings along notable language features.
There are a few core reasons why Dart still exists:
Google has invested heavily in Dart and continues to develop and improve the language.
■ Flutter:Dart is Flutter's main programming language, and Flutter's popularity has fueled Dart's growth and existence.
■ Hiệu suất cao:Dart compiles to native machine code, optimizing performance for mobile and desktop applications.
Dart features a modern and straightforward syntax that is easy to grasp, particularly for individuals with a background in object-oriented programming languages like Java, C#, or JavaScript.
■ Cross-platform capabilities:Dart supports cross-platform application development, allowing developers to code once and deploy across various platforms such as Android, iOS, web, and desktop.
The decision to use Dart for this project was influenced by its modern syntax, ease of learning, and robust cross-platform support for Android, iOS, and other platforms, making it an ideal choice for development tasks.
Node.js, an open-source and cross-platform JavaScript runtime environment, has revolutionized the web development industry by enabling server-side programming with JavaScript outside of the browser This article explores the core concept of Node.js, highlighting its advantages, introductions, and benefits, while showcasing its transformative potential in online development.
Node.js empowers developers to create scalable network applications with JavaScript, a language previously limited to client-side scripting This integration of client and server-side development simplifies the development process, allowing the use of a single language throughout the technology stack As a result, it reduces the learning curve for beginners and enhances collaboration among development teams.
Main features of Node.js
1 Because of its event-driven, asynchronous architecture, Node.js can efficiently handle multiple requests at once without experiencing a stutter This will be especially useful for applications like real-time web apps that need to process multiple connections at once.
2 High Performance:Node.js is based on the V8 JavaScript Engine, which carries over its excellent performance to allow for quick and effective execution of JavaScript code.
3 NPM (Node Package Manager):Developers can effortlessly install, manage, and distribute open-source libraries with the help of NPM, a robust package management included with Node.js NPM boasts hundreds of thousands of packages, making it one of the biggest software package ecosystems out there today.
4 Scalability:Because it supports object-oriented, functional, and event-driven programming, Node.js is built for simple scaling Furthermore, Node.js's ability to grow via modules lets programmers design intricate and expansive applications.
Benefits of using Node.js
1 JavaScript is comprehensive:With Node.js, JavaScript can be used for both client-side and server-side programming, which simplifies the creation and upkeep of apps.
2 High efficiency for I/O applications:Node.js is highly efficient in applications with many I/O tasks, such as database queries, file read/write operations, and network processing.
3 Strong community support:Node.js has a large and thriving community, providing extensive documentation, software packages, and supportive tools.
4 Good scalability:Node.js allows for easy scalability of applications both horizontally (adding more servers) and vertically (enhancing the performance of existing servers).
2.1.3 Theoretical basis for information system analysis and design
An information system is a system that includes: people, facilities and information processing methods in an organization.
Information systems include two basic components: data that records the current state of the business and processes that allow data transformation.
Data refers to the information that is collected and preserved to represent the current or historical state of a business It can be categorized into two main types: data that illustrates the internal structure of the organization and data that reflects its business activities.
- Processing: These are processes that transform information, aiming for two main purposes.
- Producing information in a prescribed format, such as preparing transaction documents, preparing reports, preparing statistics
- Decision support usually provides information necessary for making a leadership decision, but it can also be a decision choice.
The information system development process consists of several stages that can vary in number based on the chosen methodology and regulations Typically, this process is summarized into key steps: Survey, Analysis, Design, Construction, System Installation, and Maintenance.
2.1.3.2 Object-oriented analysis and design concepts
Object-oriented analysis and design (OOAD) is the process of analyzing a system to identify its components and understand their interactions and connections By gaining a comprehensive understanding of all objects within the system and their relationships, programmers can more effectively comprehend and implement the system.
Advantages of Object-Oriented Analysis and Design:
1 Closer to the real world: OOAD reflects real-world entities and their interactions, making it easier to model complex systems.
2 Reusability: By allowing objects and their behaviors to be shared among many system components, development time and expense can be decreased.
3 Inheritance: By allowing objects to take on traits and actions from other objects, inheritance encourages code reuse and eliminates duplication.
4 High modularity: Systems designed using OOAD principles are composed of modular, self-contained components, enhancing maintainability and scalability.
5 Increased reliability: By encapsulating data and behavior within objects,OOAD helps create more robust and reliable systems.
1 Complexity: OOAD can become complex, especially for large-scale systems with intricate relationships between objects.
2 Difficulty in tracking data flow: It may be challenging to trace the flow of data between objects in a complex object-oriented system compared to functional system design.
Despite these drawbacks, the benefits of OOAD often outweigh the challenges, particularly in building scalable, maintainable, and reliable software systems.
UML concept (Unified Modeling Language): Unified modeling language, a language used to specify, visualize and document object-oriented software.
Observations from various perspectives are essential for analyzing and designing systems These observations help establish the architecture for the system to be developed There are five types of observations:
1 Use Case Observation: Observing how users interact with the system, identifying their needs, and defining the system's functionalities based on these interactions.
2 Logical Observation: Analyzing the logic and algorithms required to implement the system's functionalities, focusing on the computational aspects of the system.
3 Component Observation: Identifying the different components or modules of the system and how they interact with each other to achieve the system's objectives.
4 Interaction Observation: Observing the interactions and relationships between different components or modules of the system, including communication protocols, data exchange formats, and control flow.
5 Deployment Observation: Considering how the system will be deployed and executed in a real-world environment, including hardware infrastructure, network topology, and system scalability.
6 By combining insights from these different types of observations, developers can create a comprehensive architecture that addresses all aspects of the system's requirements and objectives.
A diagram is a visual representation that illustrates the elements of a model and their interconnections, capturing various observations from multiple viewpoints Each component of the system can be represented in one or more diagrams, allowing for a comprehensive understanding There are nine distinct types of diagrams utilized together to present all perspectives of a system effectively.
▪ Use Case Diagram: Describes the interaction between external actors and the system through use cases.
▪ Class Diagram: Depicts the static structure, describing the conceptual model including object classes and their relationships in the object-oriented system.
▪ Object Diagram: A version of the class diagram and often uses symbols similar to the class diagram.
▪ Sequence Diagram: Illustrates the interaction of objects with each other over time.
A collaboration diagram, akin to a sequence diagram, focuses on the interactions between objects as they work together It highlights how these objects exchange messages to meet specific requirements within a given context.
▪ State Diagram: Represents the life cycle of objects, subsystems,and the entire system.
▪ Activity Diagram: Indicates the flow of activities within the system.
▪ Component Diagram:Shows the physical structure of components within the system.
▪ Deployment Diagram: Illustrates the physical arrangement of components according to the designed architecture of the system.
▪ Realization: is the connection between interface and class semantics;
▪ Dependency: is the semantic link between two items wherein changes to one will have an impact on the dependent element's semantics;
▪ The connection known as inheritance (generalization) explains the generalization whereby some particular objects (of the subclass) would inherit the attributes and functions of the general objects (the base class).
▪ Association is a structural relationship that defines the connection between classes of objects.
Model elements are the fundamental concepts depicted in diagrams, embodying well-known object-oriented principles Each model element consistently maintains a singular meaning and symbol, even when utilized across various diagrams.
SYSTEM ANALYSIS AND DESIGN
REQUIREMENT ANALYSIS
Leveraging e-commerce in buying and selling exchanges offers numerous advantages for businesses, including substantial reductions in advertising costs and access to a variety of convenient services To enhance user experience, we developed a music management and distribution app that allows users to effortlessly search, listen to, and purchase music at competitive prices online This innovative solution eliminates the need for physical store visits, ultimately saving customers time, money, and effort.
This music app streamlines access to music for users while offering substantial advantages for artists and managers Artists can effortlessly share their work with a broader audience, bypassing complicated distribution processes Meanwhile, managers benefit from the ability to track revenue, analyze user listening trends, and manage music content with greater ease and precision.
- Understand operations and related processes.
- Understanding the actual status of applications and users using similar applications is lacking.
- Understand the functional requirements of the problem and then design and develop software that closely follows the requirements
Survey location: International School Campus - Hanoi National University, No 1 Trinh Van Bo, Xuan Phuong, Hanoi
- Students affiliated with the International School - Hanoi National University
- Representative:Mr Vu Dang Son Tung
- Position:Student of Computer Engineering Informatics - International School - Hanoi National University
- Conduct a survey directly at the International School campus.
- Ask interview questions to learn how the system works.
Table 3.1 Interview questions Interview questions Responses from students
How do you manage your music library with current apps?
I often use applications like Youtube or Spotify to save music or watch and listen directly
Do you often pay attention to the list management job you want to hear about?
What do you usually do to check music payments by month or year?
Usually packages will be announced depending on your purpose for registering
What is the buying and selling process between our customers and the current application you are using?
The buying and selling process includes 2 stages:
1 I find monthly or annual packages suitable for me
2 You can choose the payment stages
What do you do when you need to find a song?
For songs that I still remember, I can probably remember them in about 1 minute, but if I don't remember, I'll probably have to search.
How do customers choose books and order?
Currently, our buying and selling activities are conducted exclusively in-store, with no plans for online book orders Occasionally, regular customers reach out to reserve books or inquire about available quantities.
Can you tell us more about your own experiences with the current music streaming application?
The current experience is quite good as the majority of the music I need will be available on current applications and there could be more so I'm quite satisfied.
What do you think if there was an application that could improve your music experience?
That's quite good because in part, current applications have a lot of ads and are affecting my music experience.
The working process of a music application in Vietnam can be described through the following steps:
- Market research: Survey the music needs and preferences of users in Vietnam, analyze existing music applications and identify strengths and weaknesses.
- Project planning: Determine goals, scope, budget and timeline for the music application development project
- User interface design (UI/UX): Create user-friendly, easy-to-use interface designs, optimizing user experience.
- Build wireframes and prototypes: Outline the application structure and create test samples to collect feedback from users.
- Frontend development: Build user interfaces on platforms such as iOS, Android and web.
- Backend development: Set up servers, databases and necessary APIs to process data and interact with the user interface.
- Payment system integration: Connect with payment gateways so users can buy music and services easily.
4 Sign contracts with artists and record labels
- Sign copyright contracts: Work with artists, producers and record labels to ensure legal use of musical works.
- Build a music library: Create and manage a rich music database, including songs, albums and artists.
- Functional testing: Make sure all application features work properly and stably.
- Performance testing: Make sure the application operates smoothly, without lag when downloading or playing music.
- Security testing: Ensure personal information and user data are kept safe.
- Beta release: Give a limited number of users access to a test version in order to get their input and make necessary changes.
- Official launch: Release the application on platforms such as Google Play, App Store and official website.
- Marketing campaign: Use social media channels, online and offline advertising to promote the application.
- Promotions: Organize promotional events, giveaways and discounts to attract new users.
-Customer support: Provide user support services through many channels such as email, phone and online chat.
- Updates and upgrades: Continuously improve and update the application based on user feedback and market trends.
- Data analysis: Use analytics tools to track user behavior, downloads, revenue and other key metrics.
- Optimize user experience: Based on analytical data to optimize the application's interface and functions, improving user experience.
3.1.5 Evaluation of traditional music application systems
1.Fast loading speed:Traditional music applications are often well optimized, allowing for quick and seamless music playback.
2.Processing power:Good processing capability even with multiple users accessing simultaneously.
1.Large file size:Some applications may occupy a significant amount of storage space, affecting the overall performance of the device.
2.Copyright limitations:Some songs may not be available due to copyright issues, restricting users' options.
3.Cost: Premium service packages can be expensive, making it difficult for some users to access.
4.Advertisements:Free users often have to endure disruptive advertisements during their music listening experience.
5 Personalization options: While some apps offer music recommendation features, others may lack deep customization options according to individual preferences.
3.1.6 Plan to build a new system
Sequence of steps for the project:
1 Determine Project Objectives and Scope
2 Market Research and Competitive Analysis
3 Build Wireframes and Design Interfaces
Building a new music application with the primary goal of music listening and providing users with a convenient and efficient experience:
Customers can view, search for information about a song or an artist intuitively and can directly enjoy various types of music online without the need to visit physical music stores.
Songs, artists, or albums must be categorized to enable users to search conveniently.
The system must have two separate interfaces: one for customers and one for the application's manager to update system data: updating songs, customers, suppliers,artists, and providing customer support.
- Friendly, simple, easy to use.
- Friendly, simple, easy to use.
- Friendly, simple, easy to use.
- Present complete information about the product.
4 Product search and filter function
- Filter products by music genres
6 Functions for employees or managers:
▪ Add/Remove song from playlist
● Easy to use for employees and managers
● Management covers all activities and objects in the system
SYSTEM ANALYSIS
Agent Actor's activities UC impacts
Log in to the system, check account information, change password;
- Manage customer and supplier information
Customer Management Feature Management Artis Management Brand Management Account Management
- Register an account, log in to the system, manage account information;
- Listen, Skip, Previous, Pause music
- View products by type, search for products,
- Search music by separate categories
- Add favorite products, remove favorite products;
Figure 3.1 General use case diagram
Figure 3.2 Product management use case diagram
Table 3.4 Specification of product management chart
Describe -Allows users to add, edit, and delete products.
- Allows users to search, view product details or statistics.
- User access to the management system.
- Log in with your employee or administrator account
- When adding, editing or deleting a category is successful, you will return to the product categories list screen.
- When the search is successful, a list of results will be returned. When viewing product details, the product details screen will be displayed.
- When adding or editing products, if the data fields are left blank or entered incorrectly, an input data error will be reported.
- When sending a request to the database with an error, the server will be notified of an error and asked to try again.
- Click on the product management function.
Use Case for category management
Figure 3.3 Category management use case diagram
Table 3.5 Category management chart specification
Describe - Allows users to add, edit, delete, product categories.
- User access to the management system.
- Log in with the administrator account
- When adding, editing or deleting a category is successful, you will return to the product categories list screen.
- When adding or editing categories, if the data fields are left blank or entered in the wrong format, an input data error will be reported.
- When sending a request to the database with an error, the server will be notified of an error and asked to try again.
- Click on the category management function.
Use Case for customer management
Figure 3.4 Customer management use case diagram Table 3.7 Specification of customer management chart
- Allows users to edit information and delete customers.
- Allows users to search and view customer details.
- User access to the management system.
- Log in with your employee or administrator account
- When the operation to edit or delete a customer is successful, return to the customer list screen.
- When the search operation is successful, the corresponding customer list is returned.
- When viewing customer details, it will return to the customer details screen.
- When editing customer information, if the data fields are left blank or entered in the wrong format, an input data error will be reported.
- When sending a request to the database with an error, the server will be notified of an error and asked to try again.
- Click on the customer management function.
Figure 3.5 Account management use case diagram Table 3.10 Specification of account management chart Use Case
Describe - Allows administrators to add, edit, and delete user accounts. Implementer - Administrators
- User access to the management system.
- Log in with the administrator account
- When adding, editing or deleting accounts successfully, return to the account list screen.
- When adding or editing account information, if the data fields are left blank or entered in the wrong format, an input data error will be reported.
- When sending a request to the database with an error, the server will be notified of an error and asked to try again.
- Click on the account management function.
Figure 3.6 Push notification use case diagram Table 3.11 Notification push chart specification
Describe - Allows administrators to create notifications to customers.
- User access to the management system.
- Log in with your employee or administrator account
- When the push notification operation is successful, return to the main screen
- When entering notification content, if the data fields are left blank or in the wrong format, an input data error will be reported.
- When sending a request to the database with an error, the server will be notified of an error and asked to try again.
- Click on the notification push function.
- Enter the notification to push and press push.
Use Case for listening to music
Figure 3.7 Music listening use case diagram Table 3.13 Preferred product management chart specification
Describe - Allow customers to turn on music, play the next song, the previous song Implementer - Client
Pretreatment conditions - User accesses the application.
- When listening, skip, previous, images corresponding to the song appear.
Exception - When sending a request to the database with an error, the server will be notified of an error and asked to try again.
Use Case for managing favorite products
Figure 3.8 Use Case diagram for managing favorite products Table 3.13 Preferred product management chart specification
Describe - Allow customers to add or remove their favorite products.
Pretreatment conditions - Users access the sales system.
- When adding or deleting favorite products successfully, return to the list of favorite products screen.
Exception - When sending a request to the database with an error, the server will be notified of an error and asked to try again.
- Click on the favorite product management function
Use Case for playlist management
Figure 3.9 Use Case diagram for playlist management Table 3.14 Specification of playlist management use case diagram
Describe - Allow customers to create their own playlists
Pretreatment conditions - User accesses the application.
- When the playlist creation operation is successful, it will return to the playlist screen
Exception - When sending a request to the database with an error, the server will be notified of an error and asked to try again.
- Click on the add playlist function
Figure 3.10 Historical management use case diagram Table 3.15 History management use case diagram specification
Tên Use Case Quản lý danh mục
Describe - Allows customers to view previous history
Pretreatment conditions - User accesses the application.
- When viewing history, the screen will display the history of used songs
Exception - When sending a request to the database with an error, the server will be notified of an error and asked to try again.
- Click on the history view function
System design
SOFTWARE INSTALLATION AND TESTING
Install software
4.1.1 Bring system data to the deployment environment
- The steps to install Directus and deploy it on a VPS are as follows:
3 Run the command: `npm init directus-project@latest `
4 Navigate to the project directory: `cd `
5 Start Directus with PM2: `pm2 start npx name "directus" directus start
4.1.2 How to convert download to mp3
- By using the y2mate.com website we can download video or music in youtube to change them into mp3 files and we can add it on the Directus Doc
2 Run the commandssh root@64.176.85.156to connect to the server via SSH.
3 Enter the password:H9_dSYx%dkK8_mkK.
○ Switch to the postgres user:sudo -i -u postgres
○ Open the PostgreSQL prompt:psql
○ Create the database:CREATE DATABASE directus;
Navigate to thewwwDirectory in/var: sh
Copy code cd /var/www
Initialize the Directus Project: sh
Copy code npm init directus-project@latest hanhmusicapp.xyz
Navigate to the Newly Created Folder: sh
Copy code cd hanhmusicapp.xyz
Start Directus with PM2: sh
Copy code pm2 start npm start
● At this point, the CMS code is running on port 8055.
Navigate to thesites-availableDirectory in/etc/nginx: sh
Copy code cd /etc/nginx/sites-available
Create the Configuration File for the Domain: sh
Copy code nano hanhmusicapp.xyz
Add the following content to the file: nginx
To configure the server for the domain hanhmusicapp.xyz, set up a proxy to forward requests to the local server at http://127.0.0.1:8055 Ensure that the Host and IP headers are correctly passed, including X-Real-IP and X-Forwarded-For for client identification Implement a timeout of 30 seconds for connection and send operations, while allowing a lengthy read timeout of 86400 seconds Utilize HTTP/1.1 for communication and enable header upgrades for WebSocket connections Additionally, maintain the content security policy by passing the relevant headers and adding cache status information in responses.
Link the Configuration File tosites-enabled: sh
Copy code sudo ln -s /etc/nginx/sites-available/hanhmusicapp.xyz /etc/nginx/sites-enabled/
Run Certbot to Install SSL: sh
● Choose the correct domain name to install SSL.
Copy code sudo systemctl reload nginx
Test and tracking program
Table 4.1 Scenario to test customer login function
ID Purpose Implementation steps Estimate results Result
Check the captured input of the
1 Do not enter the username field
2 Other fields are entered validly.
2 Focus on the error field.
1 Do not enter the password field.
2 Other fields are entered validly.
2 Focus on the error field.
1 Leave both username and password blank
2 Focus on the error field.
Check if the login is successful
1 Enter the username/password that exists in the system.
Check for failed login cases
1 Display error message: "Your account or password is incorrect".
2 Focus on the error field.
1 Display error message: "Your account or password is incorrect".
2 Focus on the error field.
1 Display error message: "Your account or password is incorrect".
2 Focus on the error field.
1 Enter the username field with all white characters
2 Enter the correct password field
1 Display error message: "Your account or password is incorrect".
2 Focus on the error field.
2 Enter blank characters in the password
1 Display error message: "Your account or password is incorrect".
2 Focus on the error field.
1 Enter the username and password fields with all white characters
1 Display error message: "Your account or password is incorrect".
2 Focus on the error field.
1 Enter the wrong username format
1 Display error message: "Your account or password is incorrect".
2 Focus on the error field.
ID12 1 Enter the correct username
1 Display error message: "Your account or
2 Enter the wrong password format
3 Click Login password is incorrect".
2 Focus on the error field.
1 Enter the wrong format for both username and password
1 Display error message: "Your account or password is incorrect".
2 Focus on the error field.
Table 4.2 Registration function test script
ID Purpose Implementation steps Estimate results Result
Check the username input field
1 Enter a username that does not exist
2 Other fields are entered validly.
2 Other fields are entered validly.
2.Focus on the error field.
1 Do not enter anything in the username field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter blank characters in the username field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter the leading and middle spaces in the username field
2 Other fields are entered validly
2 Focus on the error field.
ID6 1 Enter a username field greater than 32 characters
2 Other fields are entered validly
2 Focus on the error field.
1 Do not enter anything in the last name field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter blank characters in the last name field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter the last name field with leading and trailing blanks
2 Other fields are entered validly
2 Focus on the error field.
1 Enter more than 32 characters in the last name field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter a valid last name field
2 Other fields are entered validly
1 Enter nothing in the name field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter blank characters in the name field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter the name field with leading and trailing whitespace
2 Other fields are entered validly
2 Focus on the error field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter a valid name in the field
2 Other fields are entered validly
1 Do not enter anything in the password field or enter characters over 32 characters
2 Other fields are entered validly
2 Focus on the error field.
1 Enter blank characters in the password field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter the correct password under 32 characters
2 Other fields are entered validly
Check the password re-enter
1 Do not enter anything in the re-enter password field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter blank characters in the password re-enter field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter the correct password in the password field
2 Other fields are entered validly
1 Enter an email that does not exist and has the correct syntax abc@gmail.com
2 Other fields are entered validly.
1 Enter emails that exist in the database
2 Other fields are entered validly.
2 Focus on the error field.
1 Leave the email field blank
2 Other fields are entered validly
2 Focus on the error field.
1 Enter blank characters in the email field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter the wrong email field format in the following cases:
- Enter email without dot domain name
- Enter email without com double
2 Other fields are entered validly
2 Focus on the error field.
1 Enter data containing special characters #$% or enter email using a draw sign@gmail.com
2 Other fields are entered validly
2 Focus on the error field.
1 Enter email with more than
2 Other fields are entered validly
2 Focus on the error field.
Table 4.3 Test scenario for editing account information
ID Purpose Implementation steps Estimate the plan Result
1 Enter an email that does not exist and has the correct syntax abc@gmail.com
2 Other fields are entered validly.
1 Enter emails that exist in the database
2 Other fields are entered validly.
2 Focus on the error field
1 Leave the email field blank
2 Other fields are entered validly
2 Focus on the error field
1 Enter blank characters in the email field
2 Other fields are entered validly
2 Focus on the error field
1 Enter the wrong email field format in the following cases:
- Enter email without dot domain name
- Enter email without com double
2 Other fields are entered validly
1 Enter an email containing the special characters #$% in addition to the @ sign
2 Other fields are entered validly
2 Focus on the error field.
1 Enter email with more than
2 Other fields are entered validly
2 Focus on the error field
Check the phone number input field
1 Do not enter anything in the phone number field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter blank characters in the phone number field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter in the phone number field data that is less than 9 characters and greater than 11 characters
2 Other fields are entered validly
2 Focus on the error field.
#, $, %, etc in the phone number field.
2 Other fields are entered validly
2 Focus on the error field.
1 Enter in the phone number field the letters a b c d e, etc.
2 Other fields are entered validly
2 Focus on the error field.
1 Enter in the phone number field:
- Data is all numeric characters
2 Other fields are entered validly
1 Do not enter anything in the address field
2 Other fields are entered validly
2 Focus on the error field.
Kiểm tra trường nhập địa chỉ
1 Enter blank characters in the address field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter your correct address in the address field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter special characters in the address field such as: @,
2 Other fields are entered validly
2 Focus on the error field.
2 Other fields are entered validly
2 Focus on the error field.
Check the username input field
1 Enter a username that does not exist
2 Other fields are entered validly.
2 Other fields are entered validly.
2 Focus on the error field.
1 Do not enter anything in the username field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter blank characters in the username field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter the leading and middle spaces in the username field
2 Other fields are entered validly
2 Focus on the error field.
1 Enter a username field greater than 32 characters
2 Other fields are entered validly
2 Focus on the error field.
Define your analysis and tracking objectives
- Understanding how users interact with the app.
- Tracking the performance of songs, playlists, and app features.
- Measuring user satisfaction and loyalty.
User Interaction KPIs: Daily Active Users (DAU): Number of unique users who interact with the app daily.
Monthly Active Users (MAU): Number of unique users who interact with the app monthly.
Average Session Duration: Average time users spend in the app per session.
Song Performance KPIs: Number of Plays per Song: Total plays each song receives.
Add to Playlist Rate: Number of times a song is added to user playlists.
Skip Rate: Percentage of times users skip a song before it ends.
Playlist Performance KPIs: 3 Number of Playlists Created:
Total playlists created by users.
4 Playlist Play Rate: Number of times playlists are played.
User Satisfaction KPIs: User Ratings and Feedback: Average rating score and qualitative feedback from users.
Conversion Rate: Percentage of users who convert from free to paid subscriptions.
KPIs Average Session Duration: 15 minutes
Set up analytics tools Google Analytics: For overall app analytics.
Firebase Analytics: For detailed app user behavior tracking.
Mixpanel: For advanced event tracking and user segmentation.
Amplitude: For user journey and behavior analysis.
Reports: Weekly reports on song plays, retention, and user feedback.
Analyze the data Identify trends in user engagement and interaction.
Determine the most and least popular songs and playlists.
Analyze the reasons behind high skip rates or low retention rates.
Segment users based on behavior, such as frequent listeners, playlist creators, and new users.
Analysis Identify top-performing songs and playlists, analyze user churn reasons, segment users.
Possible Recommendations: Improve song recommendation algorithms to increase user engagement.
Enhance the user interface for easier navigation and discovery.
Introduce new features like curated playlists or social sharing options.
Offer incentives or exclusive content for premium users to reduce churn.
Recommendations Enhance song recommendations based on user behavior.
Redesign the home screen for easier access to popular features.
Introduce a "Discover Weekly" playlist based on user preferences.
CONCLUSION AND DEVELOPMENT DIRECTIONS
Result
Working on the "Developing a Music App for Mobile Devices" project has significantly expanded my understanding of the Android operating system and the development process of applications I successfully applied this knowledge to create a fashion sales management application, which enhanced my skills in Android application analysis, design, programming, teamwork, and report presentation.
Despite my diligent efforts and the invaluable support from Mr Nguyễn Doãn Đông, this report may still contain errors or omissions I kindly request the teachers to review and evaluate my work, as their feedback will help me identify my mistakes and improve my skills for future projects.
The completion status of my project can be summarized as follows:
- Successfully developed software with the necessary functions that operate efficiently, applying information technology to manage music content.
- Presented various topics related to Android, Java, and interactions with MySQL SERVER in mobile application programming.
- Analyzed the application system, including the interface and user controls, to meet user requirements.
- Deployed and installed the application in the Android environment.
- Acquired knowledge and usage of the MVVM model, applying Reactive
Extension libraries such as RxJava, and interacting with MySQL SERVER in mobile software development.
- Successfully addressed the challenge of managing music data within the application.
- Success in developing a music app for mobile devices
Limit
My limited expertise in application development and backend processes for APIs and databases has hindered the app's optimization, resulting in a subpar user experience.
Future and Goals
Continuously enhance and refine both applications to become more user-friendly,improve performance and stability, and ensure safety and security.
I aim to enhance my expertise in Android programming and related technologies to develop a wide variety of applications across different sectors, extending beyond the realm of e-commerce.
1 Saigon Technology - Global Software Development Company “Vietnam Adapts to Technological Changes of Industry 4.0.” LinkedIn, 19 July 2022, https://www.linkedin.com/pulse/vietnam-adapts-technological-changes-industry-40 -saigon-technology
2 Center for Economic and Business Research and Consulting “THE IMPACT OF
COVID-19 ON LOGISTICS IN VIETNAM.” National Economics https://neu.edu.vn/Resources/Docs/SubDomain/crceb/B5-KỈ%20YẾU%20HỘI%20TH ẢO%202-12.pdf
3 “Vietnam achieves a higher 4G coverage rate than high-income countries.”
Vietnam.vn,8 November 2023 https://www.vietnam.vn/en/viet-nam-dat-ty-le-phu-song-4-g-cao-hon-cac-nuo c-thu-nhap-cao/
4 Dam, Ly “Native Mobile App Development — Top 9 Key Benefits.” Ekotek, 1 May 2023, https://ekotek.vn/benefits-of-native-mobile-app-development
5 TopDev “Framework là gì? Tìm hiểu về các Framework.” TopDev, Unknow, https://topdev.vn/blog/framework-la-gi/
6 Bhatt, Tuhin “Android Version History: From 2008-2024 (An Overview).” Intelivita, 18
March 2024, https://www.intelivita.com/blog/android-history/
7 Unknown “Flutter là gì? Giải thích về Flutter – AWS.” Amazon AWS, https://aws.amazon.com/vi/what-is/flutter/
8 Dart.dev Dart programming language | Dart https://dart.dev
9 Node.js Node.js — Run JavaScript Everywhere https://nodejs.org/en
10 IT Navi - Nền tảng kết nối việc làm IT “Android Studio là gì? Hướng dẫn sử dụng Android Studio.” ITNavi, 27 January 2021, https://developer.android.com/studio
11 Morales, Jade “Draw.io: Đánh giá toàn diện về các tính năng, giá cả và hơn thế nữa.”