Professional Documents
Culture Documents
Healthcare
Healthcare
PLAYER
19IT552- SOFTWARE ENGINEERING
LABORATORY
MINI PROJECT REPORT
SUBMITTED BY ,
Nandhini .R 2020060
Shahina Fathima 2020060
Visali .N 202006057
2022-2023
1
CERTIFICATE
.………………… …………………………
2
ACKNOWLEDGEMENT
We have taken efforts in this project. However, it would not have been possible
without the kind support and help of many individuals and our reputed institution
Mepco Schlenk Engineering College, Sivakasi. We would like to extend our sincere
thanks to our Principal Dr. S. Arivazhagan ME., PhD.
We would like to express our gratitude towards other teaching and non teaching
staff members of IT Department for their kind co-operation and encouragement
which help us in all means to complete this project successfully.
3
ABSTRACT
This project is about the mp3 music player application development using Android. The biggest
difference between the music player and existing applications is that it is completely free for users
to use. It will integrate the advantages of existing music players on the market, as far as possible to
mining out the existing music players' function, and then do the filtering in order to eliminate
function that not practical or low cost-effective. Also, it will be keep improved based on user
feedback. In addition, depending on the user's usage scenario, the music player will also add some
modes, such as driving mode and night mode, to allow users to use the application in any situation
or environment.
Moreover, the music player will have audio trim features, allowing users to trim the best part of
their favorite song into phone ringtone or alarm. On the other hand, the existing music players pay
less attention to the control of gestures. Therefore, the music player will solve the limitation by
adding more gestures and shake the phone feature for media control to make it more user-friendly
and humanity.
In a nutshell, the methodology for developing the mp3 music application used in this project is the
agile development cycle. The agile development cycle consists of six phases, which is requirements
analysis, planning, design, implementation or development, testing, and deployment. Due to the
iterative and flexible nature of this approach, it is able to effectively adapt to users with changing
requirements
4
TABLE OF CONTENTS
1.Introduction 6
1.1Purpose 6
1.2 Scope 6
1.3 Definitions, Acronyms and Abbreviations 7
1.4 References 7
1.5 Overview 7
2.Implementation/Coding 22
3..Screen Shots 41
4.Conclusion 46
5
1.Introduction
Android is an open-source software stack created for mobile phones and other devices . The
Android Open Source Project (AOSP) , led by Google, is tasked with the maintenance and
further development of Android. Many device manufacturers have brought to market devices
running Android, and they are readably available around the world. Android’s purpose is to
establish an open platform for developers to build innovative mobile apps. Three key components
work together to realize this platform. The Android Compatibility Program defines the technical
details of Android platform and provides tools used by OEMs to ensure that developers’ apps run
on a variety of devices . The Android SDK provides built-in tools that Developers use to clearly
state the device features their apps require. And Android Market shows apps only to those
devices that can properly run those . This software is for android operating system software,
users can easily for music software of play, convenient and quick, use simple UI realized the use
function, in this software music can free play, and you can use it to change the state of the mobile
phone, unique menu to the user perfect experience.
1.1 Purpose
MP3 players allow the user to play music, podcasts and so on anywhere. Music is easily
stored and managed on the MP3 player, including skipping tracks or, on some models,
arranging playlists. They are portable digital music players that play music as audio files,
such as MP3. In addition, most of these devices allow to store video, pictures, and to receive
radio and TV programs (podcasting). Earphones and external speakers are the typical output
devices delivering sound to the listener.
1.2 Scope
The "Flutter Based Music Player" is a flutter-based mobile application that helps people
to listen to music from the internet which is already streamed and they can add favorites
to it and make playlists too. The additional requirement is to record the audio while
listening and save it in internal memory, it can be used in offline mode. The application
should be free to download in the form of APK file.
Users can access the music that is available on the internet and listen to them. we can
listen to music in offline mode by recording.
Furthermore, the software needs the Internet to fetch and display results. All system
information is maintained in a database, which is located on a web server. Users can
download it from the play store and search for the songs they wish to listen to, all they
need is an internet facility available during all of this process.
6
1.3 ACRONYMS AND ABBREVATION
ACROMYMS ABBERVATIONS
APPS Applications
CPU Central Processing Unit
IOS iPhone Operating System
MV Music Video
MP3 MPEG 1Audio Layer 3
MP4 MPEG Layer 4
UI User Interface
UTAR Universiti Tunku Abdul Rahman
XML Full Extensible Markup Lnguage
APK Android Applicaton Package
1.4 References
[1] https://www.youtube.com/watch?v=__Yardq8bmI
Coding tony
[2] https://nevonprojects.com/media-player-project/
Nevon projects, selection, and spec preparation.
1.5 Overview
Android SDK
The Android software development kit (SDK) includes a comprehensive set of development
tools. These include a debugger, libraries, a handset emulator (based on QEMU), documentation,
sample code, and tutorials. Currently supported development platforms include computers
running Linux (any modern desktop Linux distribution), Mac OS X 10.4.9 or later, Windows XP
or later. The officially supported integrated development environment (IDE) is Eclipse (currently
3.5 or 3.6) using the Android Development Tools (ADT) Plug-in, though developers may use any
text editor to edit Java and XML files then use command line tools (Java Development Kit and
7
Apache Ant are required) to create, build and debug Android applications as well as control
attached Android devices (e.g., triggering a reboot, installing software package(s) remotely)
The Android open-source software stack consists of Java applications running on a Java-based,
object-oriented application framework on top of Java core libraries running on a Dalvik virtual
machine featuring JIT compilation. Libraries written in C include the surface manager, Open
Core media framework, SQLite relational database management system, OpenGL ES 2.0 3D
graphics API, WebKit layout engine, SGL graphics engine, SSL, and Bionic libc. The Android
operating system, including the Linux kernel, consists of roughly 12 million lines of code
including 3 million lines of XML, 2.8 million lines of C, 2.1 million lines of Java, and 1.75
million lines of C++.
SQLite
SQLite uses a dynamically and weakly typed SQL syntax that does not guarantee the domain
integrity. SQLite is a multitasking database concerning reads. Writes can be done only one-at-a-
time. It is a popular choice for local/client storage on web browsers. It has many bindings to
programming languages. It is arguably the most widely used database engine, as it is used today
by several widespread browsers, operating systems, embedded systems among others.
System Analysis
1.Function Division:
Music player in general are divided into two parts: part of it is the music of users to
play, and the other part of it is to mobile phone user mode, and the control of the situation
with the simplest method shows to users of the perfect play experience.
2. Functional Description:
(1)User-oriented function Song list: users can play list of the definition, still can scan all
import, this simplified the user needs, personalized Settings, allowing the UI experience
more perfect.
8
Fig :1.5-1 Site Diagram
Proposed Approach:
When the user starts the application, they can select two types of the main action of
the application. The main action is divided into the music player and mp3 cutter. The first case is
a music player, where users can select a song they want to listen to under the "My music"
fragment and click it to play. In the music playing interface, users have a variety of options for
action which are playing as driver mode, media control with shaking, media control with the
gesture, media control with the icon button. The second case is an mp3 cutter. After the user
selects the song he or she wants to trim, the application will start to trim the music and save it to
the mobile device. At this point, the application will ask the user if they want to set the trimmed
audio to ringtone and then finish the action. After the completion of the action, the user can
choose whether to exit the application or not, if "no" back to select action interface, if "yes"
terminate the application
9
Fig 1.1-2 Proposed System Design
Diagrams:
10
Usecase Diagram
Activity Diagram:
11
Fig: 1.1-4 Activity Diagram
The user starts the application and then it will go to the home page which is the "My music"
page. The application will read the device's local songs and generate a playlist. After that, the
user selects the song and plays it, the page will jump into the playing music interface, where the
user is allowed to control the music. Playing modes are allowed to control music play orders
12
which are shuffle playback, single cycle, and normal playback. Moreover, the user can also skip
to the next song, back to the previous song and play or pause the current music to control music.
Lastly, the user can enable the driver mode to play the song.
In order to cut the MP3 song, the user needs to select an MP3 song to be trim after entering the
audio trim page. After that, the user can drag the progress bar to set the start and end times. A
dialog box will pop up after successfully trimmed the song to ask the user whether to set the
trimmed song as the ringtone. If the user agrees, the app will successfully set the ringtone and
13
end the activity. If users don't want to be set as a ringtone, they can click on "No" to end the
activity.
Methodology
In this project, the agile development cycle will be used to guide the development process. The
reason for using agile methods is that mobile applications have a short software life cycle and
rapidly changing technologies, so users will constantly change their requirement and needs in
response to technological changes. Therefore, the agile development cycle are more suitable for
android application development because of iterative and flexible, so it can adapt effectively to
changing customers.
Requirement analysis:
At this stage, we will review existing MP3 music players on the market. After the review, we
14
will find out what current users need and idea to improve the existing music players and collect
their comments and suggestions for further analysis.
Planning:
In the planning stage, we should first try to explore out the features that the music player can
have. Next, we will eliminate the features that users feel no really useful or low cost-effective.
Finally, each feature is prioritized and assigned to an iteration.
Design:
The design stage is prepared according to the requirements of users. Since there are many details
and problems encountered during development to be considered for each feature. Therefore, we
will discuss and formulate solutions and test strategies to verify the product at this stage.
Implementation or Development:
During the development phase, we will iteratively implement each of the features listed during
the planning phase. At this stage, there will be many setbacks and obstacle, so the team needs to
constantly overcome these obstacles. Moreover, we will prioritize the most important features
and need to make intelligent trade-offs between the depth of completeness of a single feature and
the breadth of implementation of multiple features.
Testing
In this stage, we will test the performance of each feature in order to check whether it meets the
requirements of users. For example, we will test whether the application can be properly installed
and run on a real device, and check whether any errors occur in the running process and each
feature is up to standard
Deployment:
In this final phase, we will begin to deliver this application to the customer. For instance, we will
upload this MP3 music player application in the Google Play Store, or posting download links on
Utar Confession which is on Facebook in order to allow UTAR students to use it. In addition, we
will anticipate that users will encounter unpredictable problems when using the player in this
process, so we will solve these problems in a future version.
15
User requirements:
Functional Requirements:
Able to import the MP3 format files on the device into the music player
Able to play audio files smoothly
Able to download or listen to the song by searching for the name of the song,
album, or artist
Driving mode
Night mode
Songs in playlists can be quickly searched and filtered through the alphabet and
search bar
Non-functional Requirements:
Simplify user interface
Optimize the design to display the information in a better way
1. Hardware/Software Variation:
The MP3 music player application needs to ensure the application can work and installed
properly and smoothly on different devices. For example, the hardware and operating system of
each phone will be different, just like Oppo and Huawei phone is ColorOS and EMUI based on
android respectively, so need to test on different devices. In addition, the application should
adapt to different devices to ensure that no errors occur during execution to avoid different
results on different devices.
2. App in background:
Since this project is developing a music player, the running state of this application in the
background is very important. If it does not work properly in the background, this will cause the
user to have to input data from scratch or restart the application when retrieving the application.
16
Functional Requirements:
18
DEP: FR8
Functional requirement 1.10
ID: FR10
TITLE: Add to favourites
DESC: The user should be able to add favourites by clicking the favourites button which is
available in all the songs in the application.
RAT: For a user to add favourites
DEP: FR9
Functional requirement 1.11
ID: FR11
TITLE: Create playlist
DESC: The user should be able to create playlists with their own desired songs available in the
music player.
RAT: For a user to create playlist.
DEP: FR10
User Class 2-Administrator
Functional requirement 2.1
ID:FR6
Feature:Manage the app
In order to manage and administer the system.
Functional requirements 2.2
ID:FR7
Feature:Checking the app
In order to check the app and resolve the problems if any.
Functional requirements 2.2
ID:FR7
Feature:Maintain the app
In order to maintain the app in interval of time and release a new update or version.
Design constraints
This section includes the design constraints on the software caused by the hardware.
19
ID:QR1
TAG:Application memory usage
GIST:The amount of Operating System memory occupied by the application.
METER:Observation done from the performance log during testing.
Operate System:DEFINED:The mobile Operating System which the application
is running on. Example: Android.
3.4 Software system attributes
This requirements in this section specify the required availability,maintainability and portability
of the software system.
Availability
ID:QR2
TAG:System Availability
GIST:The availability of the system when it is used.
SCALE:The average system availability.
WISH:100% of the time.
ID:QR3
TITLE:Internet Connection
DESC:The application should be connected to the Internet.
RAT:In order for the application to communicate with the database.
DEP:none
Maintainability
ID:QR5
TITLE:Application Extendibility
DESC:The application should be easy to extend.The code should be written in a way that it
favors implementation of new functions.
ID:QR1
TAG:Application memory usage
GIST:The amount of Operating System memory occupied by the application.
METER:Observation done from the performance log during testing.
Operate System:DEFINED:The mobile Operating System which the application
is running on. Example: Android.
20
This requirements in this section specify the required availability,maintainability and portability
of the software system.
Availability
ID:QR2
TAG:System Availability
GIST:The availability of the system when it is used.
SCALE:The average system availability.
WISH:100% of the time.
ID:QR3
TITLE:Internet Connection
DESC:The application should be connected to the Internet.
RAT:In order for the application to communicate with the database.
DEP:none
Maintainability
ID:QR5
TITLE:Application Extendibility
DESC:The application should be easy to extend.The code should be written in a way that it
favors implementation of new functions.
21
IMPLEMENTATION
CODING:
AudioModel.java
package com.example.musicplayer;
import java.io.Serializable;
MainActivity.java
package com.example.musicplayer;
import android.Manifest;
import android.annotation.SuppressLint;
import android.content.pm.PackageManager;
22
import android.database.Cursor;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.io.File;
import java.util.ArrayList;
RecyclerView recyclerView;
TextView noMusicTextView;
ArrayList<AudioModel> songsList = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
recyclerView = findViewById(R.id.recycler_view);
noMusicTextView = findViewById(R.id.no_songs_text);
if(!checkPermission()){
requestPermission();
return;
}
String[] projection = {
MediaStore.Audio.Media.TITLE,
MediaStore.Audio.Media.DATA,
MediaStore.Audio.Media.DURATION
};
23
String selection = MediaStore.Audio.Media.IS_MUSIC +" != 0";
if(songsList.size()==0){
noMusicTextView.setVisibility(View.VISIBLE);
}else{
//recyclerview
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(new
MusicListAdapter(songsList,getApplicationContext()));
}
boolean checkPermission(){
int result = ContextCompat.checkSelfPermission(MainActivity.this,
Manifest.permission.READ_EXTERNAL_STORAGE);
return result == PackageManager.PERMISSION_GRANTED;
}
void requestPermission(){
if(ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this,Ma
nifest.permission.READ_EXTERNAL_STORAGE)){
Toast.makeText(MainActivity.this,"READ PERMISSION IS
REQUIRED,PLEASE ALLOW FROM
SETTTINGS",Toast.LENGTH_SHORT).show();
}else
ActivityCompat.requestPermissions(MainActivity.this,new String[]
{Manifest.permission.READ_EXTERNAL_STORAGE},123);
}
@Override
24
protected void onResume() {
super.onResume();
if(recyclerView!=null){
recyclerView.setAdapter(new
MusicListAdapter(songsList,getApplicationContext()));
}
}
}
MusicListAdapter.java
package com.example.musicplayer;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
ArrayList<AudioModel> songsList;
Context context;
public MusicListAdapter(ArrayList<AudioModel>
songsList, Context context) {
this.songsList = songsList;
this.context = context;
}
@NonNull
@Override
25
public ViewHolder onCreateViewHolder(@NonNull ViewGroup
parent, int viewType) {
View view =
LayoutInflater.from(context).inflate(R.layout.recycler_
item,parent,false);
return new ViewHolder(view);
}
@Override
public void
onBindViewHolder(MusicListAdapter.ViewHolder holder,
@SuppressLint("RecyclerView") int position) {
AudioModel songData = songsList.get(position);
holder.titleTextView.setText(songData.getTitle());
if(MyMediaPlayer.currentIndex==position){
holder.titleTextView.setTextColor(Color.parseColor("#FF
0000"));
}else{
holder.titleTextView.setTextColor(Color.parseColor("#00
0000"));
}
holder.itemView.setOnClickListener(v -> {
//navigate to another acitivty
MyMediaPlayer.getInstance().reset();
MyMediaPlayer.currentIndex = position;
Intent intent = new
Intent(context,MusicPlayerActivity.class);
intent.putExtra("LIST",songsList);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
});
@Override
public int getItemCount() {
return songsList.size();
}
TextView titleTextView;
ImageView iconImageView;
public ViewHolder(View itemView) {
super(itemView);
titleTextView =
itemView.findViewById(R.id.music_title_text);
iconImageView = itemView.findViewById(R.id.icon_view);
}
}
}
MusicPlayerActivity.java
package com.example.musicplayer;
import android.annotation.SuppressLint;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
TextView titleTv,currentTimeTv,totalTimeTv;
SeekBar seekBar;
ImageView pausePlay,nextBtn,previousBtn,musicIcon;
ArrayList<AudioModel> songsList;
AudioModel currentSong;
MediaPlayer mediaPlayer = MyMediaPlayer.getInstance();
int x=0;
27
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_music_player);
titleTv = findViewById(R.id.song_title);
currentTimeTv = findViewById(R.id.current_time);
totalTimeTv = findViewById(R.id.total_time);
seekBar = findViewById(R.id.seek_bar);
pausePlay = findViewById(R.id.pause_play);
nextBtn = findViewById(R.id.next);
previousBtn = findViewById(R.id.previous);
musicIcon = findViewById(R.id.music_icon_big);
titleTv.setSelected(true);
songsList = (ArrayList<AudioModel>)
getIntent().getSerializableExtra("LIST");
setResourcesWithMusic();
MusicPlayerActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
if(mediaPlayer!=null){
seekBar.setProgress(mediaPlayer.getCurrentPosition());
currentTimeTv.setText(convertToMMSS(mediaPlayer.getCurr
entPosition()+""));
if(mediaPlayer.isPlaying()){
pausePlay.setImageResource(R.drawable.ic_baseline_pause
_circle_outline_24);
musicIcon.setRotation(x++);
}else{
pausePlay.setImageResource(R.drawable.ic_baseline_play_
circle_outline_24);
musicIcon.setRotation(0);
}
}
new Handler().postDelayed(this,100);
}
});
28
seekBar.setOnSeekBarChangeListener(new
SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int
progress, boolean fromUser) {
if(mediaPlayer!=null && fromUser){
mediaPlayer.seekTo(progress);
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});
void setResourcesWithMusic(){
currentSong =
songsList.get(MyMediaPlayer.currentIndex);
titleTv.setText(currentSong.getTitle());
totalTimeTv.setText(convertToMMSS(currentSong.getDurati
on()));
pausePlay.setOnClickListener(v-> pausePlay());
nextBtn.setOnClickListener(v-> playNextSong());
previousBtn.setOnClickListener(v-> playPreviousSong());
playMusic();
if(MyMediaPlayer.currentIndex== songsList.size()-1)
return;
MyMediaPlayer.currentIndex +=1;
mediaPlayer.reset();
setResourcesWithMusic();
@SuppressLint("DefaultLocale")
public static String convertToMMSS(String duration){
long millis = Long.parseLong(duration);
30
String format = String.format("%02d:%02d",
TimeUnit.MILLISECONDS.toMinutes(millis) %
TimeUnit.HOURS.toMinutes(1),
TimeUnit.MILLISECONDS.toSeconds(millis) %
TimeUnit.MINUTES.toSeconds(1));
return format;
}
}
MyMediaPlayer.java
package com.example.musicplayer;
import android.media.MediaPlayer;
activity_main.xml
Activity_music_player.xml
Recycler_item.xml
-<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
android:paddingBottom="10dp" android:paddingTop="10dp"
android:layout_marginRight="5dp" android:layout_marginLeft="5dp"
android:layout_marginTop="5dp" android:background="#F6B8B8"
android:layout_height="wrap_content" android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:layout_height="wrap_content"
android:layout_width="match_parent" android:id="@+id/music_title_text"
tools:text="Music" android:textSize="20dp" android:textColor="@color/black"
android:padding="10dp" android:maxLines="1" android:fontFamily="sans-serif-
black" android:ellipsize="end" android:layout_toEndOf="@id/icon_view"
android:layout_marginStart="0dp"/>
</RelativeLayout>
ic_baseline_pause_circle_outline_24.xml
33
<?xml version="1.0" encoding="UTF-8"?>
-<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
android:paddingBottom="10dp" android:paddingTop="10dp"
android:layout_marginRight="5dp" android:layout_marginLeft="5dp"
android:layout_marginTop="5dp" android:background="#F6B8B8"
android:layout_height="wrap_content" android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:layout_height="wrap_content"
android:layout_width="match_parent" android:id="@+id/music_title_text"
tools:text="Music" android:textSize="20dp" android:textColor="@color/black"
android:padding="10dp" android:maxLines="1" android:fontFamily="sans-serif-
black" android:ellipsize="end" android:layout_toEndOf="@id/icon_view"
android:layout_marginStart="0dp"/>
</RelativeLayout>
ic_baseline_play_circle_outline_24.xml
<?xml version="1.0"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp" android:viewportWidth="24" android:viewportHeight="24"
android:tint="#000000" android:height="64dp"><path
android:pathData="M10,16.5l6,-4.5 -6,-4.5v9zM12,2C6.48,2 2,6.48 2,12s4.48,10
10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8
8,3.59 8,8 -3.59,8 -8,8z" android:fillColor="@android:color/white"/></vector>
ic_baseline_skip_next_24.xml
<?xml version="1.0"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp" android:viewportWidth="24" android:viewportHeight="24"
android:tint="#000000" android:height="64dp"><path
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"
android:fillColor="@android:color/white"/></vector>
34
ic_baseline_skip_previous_24.xml
<?xml version="1.0"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp" android:viewportWidth="24" android:viewportHeight="24"
android:tint="#000000" android:height="64dp"><path
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"
android:fillColor="@android:color/white"/></vector>
ic_launcher.xml
ic_launcher_round.xml
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Colors.xml
35
Strings.xml
<?xml version="1.0"?>
-<resources>
</resources>
themes.xml
<?xml version="1.0"?>
-<resources xmlns:tools="http://schemas.android.com/tools">
-<style parent="Theme.MaterialComponents.DayNight.NoActionBar"
name="Theme.MusicPlayer">
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorSecondary">@color/teal_200</item>
36
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
</style>
</resources>
Themes.xml
<?xml version="1.0"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style parent="Theme.MaterialComponents.DayNight.DarkActionBar"
name="Theme.MusicPlayer">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item><item
name="colorPrimaryVariant">@color/purple_700</item><item
name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item><item
name="colorSecondaryVariant">@color/teal_200</item><item
name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style></resources>
backup_rules.xml
-<data-extraction-rules>
-<cloud-backup>
</cloud-backup>
</data-extraction-rules>
ExampleUnitTest.java
package com.example.musicplayer;
import org.junit.Test;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
38
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
MyMediaPlayerTest.java
package com.example.musicplayer;
import junit.framework.TestCase;
ExampleInstrumentedTest.java
package com.example.musicplayer;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext =
InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.musicplayer", appContext.getPackageName());
39
}
}
3.SCREENSHOTS
40
Fig: 3.1 Song List
41
Fig: 3.2-Player List
42
Fig: 3.3-Medai Player
43
44
45
4.Conclusion
46