Professional Documents
Culture Documents
VISVESVARAYA TECHNOLOGICAL
UNIVERSITY
―Jnana Sangama‖, Belgaum, Karnataka 3 590018
<MEDIA PLAYER=
Submitted in partial fulfillment of requirements for the
Mobile Application Development Laboratory with Mini Project
Bachelor of Engineering
In
Information Science & Engineering
Submitted by
RAHUL K [4MH19IS075]
2021 – 2022
DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING
MAHARAJA INSTITUTE OF TECHNOLOGY MYSORE
BELAVADI, S.R. PATNA (T), MANDYA (D) – 571477.
I
Downloaded by Likith Pal (likipal460@gmail.com)
lOMoARcPSD|26328390
CERTIFICATE
Certified that the project work entitled ―MEDIA PLAYER has been
successfully carried out by RAHUL K [4MH19IS075] & NISCHITH GOWDA K S
[4MH18IS061] bonafide students of Maharaja Institute of Technology in partial fulfilment
of the requirements of MOBILE APPLICATION AND DEVELOPMENT
LABORATORY
WITH MINI PROJECT in Information Science and Engineering of Visvesvaraya
Technological University, Belgaum during the academic year 2021-2022. It is certified that
all corrections/suggestions indicated for the Internal Assessment have been incorporated in the
report deposited in the department library. The project report has been approved as it satisfies
the academic requirements with respect to the project work prescribed for Bachelor of
Engineering Degree.
1.
2.
II
Downloaded by Likith Pal (likipal460@gmail.com)
lOMoARcPSD|26328390
ACKNOWLEDGEMENT
We sincerely owe our gratitude to all the persons who helped and guided us in completing this
mini project work.
We are extremely thankful to Dr. Sharath Kumar Y H, Professor & Head, Department of
Information Science and Engineering, for his valuable support and his timely inquiries into
the progress of the work.
We are greatly indebted to our guide Prof. Ramya S, Asst. Professor, Department of
Information Science and Engineering, for the consistent co-operation and support.
We are grateful for their co-operation during the period of our mini project.
RAHUL K [4MH19IS075]
III
Downloaded by Likith Pal (likipal460@gmail.com)
lOMoARcPSD|26328390
ABSTRACT
Android purposes play a principal position nowadays. Applications in most cases make
ease of the work. The designed software majorly which supplies interesting know-how and
what activities. Moreover, users will doubtless be able to govern their celebration participation,
corresponding to reserving their seats in events, registering to the occasion on this android
utility by means of the cell, and plenty of others.
More importantly, the major talent of this software is it can be used for local event
administration similar to pursuits in schools, colleges and so on and will also be used for public
occasion administration such as music live shows, academic workshops and many other.
Also, it consists of alarm mechanism for the scheduled meetings in order to notify
people about the meeting scheduled. It can also be used for scheduling personal event, company
meetings etc. It is a very user-friendly utility that serves the entire performance of event
decision and registration.
IV
Downloaded by Likith Pal (likipal460@gmail.com)
lOMoARcPSD|26328390
TABLE OF CONTENTS
1.1 Overview 1
2.1 Functional 3
2.2 Nonfunctional requirements 3
2.3 Software and Hardware Specification 3--5
3. Implementation 6-18
3.4 Buttons 9
4. Snapshots 22
Conclusion 23
Reference 24
Chapter 1
Introduction
1.1 Overview
The Android multimedia framework includes support for playing variety of common
media types, so that you can easily integrate audio, video and images into your applications.
You can play audio or video from media files stored in your application's resources (raw
resources), from standalone files in the file system, or from a data stream arriving over a
network connection, all using Media Player APIs.
This document shows you how to use Media Player to write a media-playing application
that interacts with the user and the system in order to obtain good performance and a pleasant
user experience. Alternatively, you might want to use Exo player, which is a customizable
open-source library that supports high-performance features not available in Media Player
In Android, there are some problems that it is difficult to assure a security by application
implementation due to a specification of Android OS or a function which Android OS provides.
By being abused by the malicious third party or used by users carelessly, these functions are
always holding risks that may lead to security problems like information leakage. In this chapter,
by indicating risk mitigation plans those developers can take against these functions, some topics
that needs calling attentions, are picked up as articles.
Develop an a6pplication that makes use of the clipboard framework for copying and
pasting of the text.
Complexity removed.
Buffering minimized
To create a simple clipboard framework android application that allows simple copy paste
of text consisting of Text. The clipboard is a buffer that some operating systems provide for
short- term storage and transfer within and between application programs. The clipboard is
usually temporary and unnamed, and its contents reside in the computer's RAM.
Chapter 2
• Edit text
• Textview
Performance 3 how many simultaneous users or transactions the system is to service and its
response time.
Security 3 app operation and use of safety requirements related to access control, private
data processing, and external attack risk reduction.
Usability 3 ease of use and user-friendly interface, that allow users to seamlessly interact
with the product.
Extensibility 3 requirements for app extensibility in case there is a need to add new
functional requirements.
Software Requirement
8 GB RAM or more.
Hardware Specification
Processor- Intel Atom® Processor Z2520 1.2 GHz, or faster processor
Storage- Between 850 MB and 1.2 GB, depending on the language version
Software specification
Android Studio
Oracle JVM
The Oracle JVM is a standard, Java-compatible environment that runs any pure Java
application. It is compatible with the standard JLS and the JVM specifications. It supports the
standard Java binary format and the standard Java APIs. In addition, Oracle Database adheres to
standard Java language semantics, including dynamic class loading at run time.
1) Session
A session in Oracle Database Java environment is identical to the standard Oracle Database
usage. A session is typically, although not necessarily, bounded by the time a single user
connects to the server. As a user who calls a Java code, you must establish a session in the
server.
2) Call
When a user causes a Java code to run within a session, it is termed as a call. A call can be
started in the following different ways:
In all the cases defined, a call begins, some combination of Java, SQL, or PL/SQL code
is run to completion, and the call ends.
Chapter 3
Implementation
Mobile application development is the process to making software for smartphones and
digitalassistants, most commonly for Android and IOS. The software can be preinstalled on the
device, downloaded from a mobile app store or accessed through a mobile web browser. The
programming and markup languages used for this kind of software development include Java,
Swift, C# and HTML5.
Mobile app development is rapidly growing. From retail, telecommunications and e-
commerceto insurance, healthcare and government, organizations across industries must meet
user expectations for real-time, convenient ways to conduct transactions and access
information.
Today, mobile devices4and the mobile applications that unlock their value4are the
most popular way for people and businesses to connect to the internet. To stay relevant,
responsive and successful, organizations need to develop the mobile applications that their
customers, partners and employees demand.
Yet mobile application development might seem daunting. Once you’ve selected the
OS platform or platforms, you need to overcome the limitations of mobile devices and
usher your app all the way past the potential hurdles of distribution. Fortunately, by
following afew basic guidelines and best practices, you can streamline your application
developmentjourney. learn more about the specifics of mobile application development
on either platform, read our articles on IOS app development and Android app
development.
To explore mobile application development, see IBM's simple tutorial on building a voice-
enabled Android-based chatbot.
XML
Extensible Markup Language (XML) is a markup language that defines a set of rules for
encoding documents in a format that is both human-readable and machine-readable. The World
Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications
all of them free open standards define XML.
The design goals of XML emphasize simplicity, generality, and usability across the
Internet. It is a textual data format with strong support via Unicode for different human
languages. Althoughthe design of XML focuses on documents, the language is widely used for
the representation ofarbitrary data structures such as those used in web services.
Several schema systems exist to aid in the definition of XML-based languages, while
programmers have developed many application programming interfaces (APIs) to aid the
processing of XML data.
JAVA
Java is a high-level, class-based, object-oriented programming language that is designedto
have as few implementation dependencies as possible. It is a general- purpose programming
language intended to let application developers write once, run anywhere (WORA), meaning that
compiled Java code can run on all platforms that support Java withoutthe need for recompilation.
Java applications are typically compiled to bytecode that can run on any Java virtual machine
(JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and
C++, but has fewer low-level facilities than either of them. The Java runtime provides dynamic
capabilities (such as reflection and runtime code modification) that are typically not available in
traditional compiled languages. As of 2019, Java was one of the most popular programming
languages in use according to GitHub, particularly for client-server web applications, with a
reported 9 million developers.
Java was originally developed by James Gosling at Sun Microsystems (which has since
been acquired by Oracle) and released in 1995 as a core component of Sun Microsystems' Java
platform. The original and reference implementation Java compilers, virtual machines, and class
libraries were originally released by Sun under proprietary licenses. As of May 2007, in
compliance with the specifications of the Java Community Process, Sun had relicensed most of its
java technologies under the GPL-2.0-only license. Oracle offers its own HotSpot Java Virtual
Machine, however the official reference implementation is the OpenJDK JVM which is free open-
source software and used by most develpoers and is the default JVM for almost all Linux
distribution
3.3 SQLiteDatabase
familiar with SQL databases in general, and basic SQL query building. Check out the SQL
Primer chapter if you need a refresher.
Of the many storage options discussed, using a SQLite database is one of the most
versatile,and straightforward to implement.
An SQLite database is a good storage solution when you have structured data that you
need to store persistently and access, search, and change frequently.
You can use the database as the primary storage for user or app data, or you can use it
cache and make available data fetched from the cloud.
If you can represent your data as rows and columns, consider a SQLite database.
SQLite databases.
interactions with the database are through an instance of the SQLiteOpenHelper class which
executes your requests and manages your database for you. Your app should only interact withthe
3.4 Buttons
A button consists of text or an icon (or both text and an icon) that communicates what
actionoccurs when the user touches it.
epending on whether you want a button with text, an icon, or both, you can create the button in
your layout in three ways:
With text, using the Button class:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_text"
... />
1) Linux kernel
It is the heart of android architecture that exists at the root of android architecture. Linux
kernel is responsible for device drivers, power management, memory management, device
managementand resource access.
2) Native Libraries
On the top of linux kernel, their are Native libraries such as WebKit, OpenGL, FreeType,
SQLite,Media, C runtime library (libc) etc.
The WebKit library is responsible for browser support, SQLite is for database, FreeType for
fontsupport, Media for playing and recording audio and video formats.
3) Android Runtime
In android runtime, there are core libraries and DVM (Dalvik Virtual Machine) which is
responsible to run android application. DVM is like JVM but it is optimized for mobile devices.
It consumes less memory and provides fast performance.
4) Android Framework
On the top of Native libraries and android runtime, there is android framework. Android
framework includes Android API's such as UI (User Interface), telephony, resources, locations,
Content Providers (data) and package managers. It provides a lot of classes and interfaces for
android application development.
5) Applications
On the top of android framework, there are applications. All applications such as home,
contact, settings, games, browsers are using android framework that uses android runtime and
libraries. Android runtime and native libraries are using linux kerne
6) Linux kernel
It is the heart of android architecture that exists at the root of android architecture. Linux
kernel is responsible for device drivers, power management, memory management, device
managementand resource access.
7) Native Libraries
On the top of linux kernel, their are Native libraries such as WebKit, OpenGL, FreeType,
8) Android Runtime
In android runtime, there are core libraries and DVM (Dalvik Virtual Machine) which is
responsible to run android application. DVM is like JVM but it is optimized for mobile devices.
It consumes less memory and provides fast performance.
9) Android Framework
On the top of Native libraries and android runtime, there is android framework. Android
framework includes Android API's such as UI (User Interface), telephony, resources, locations,
Content Providers (data) and package managers. It provides a lot of classes and interfaces for
android application development.
10) Applications
On the top of android framework, there are applications. All applications such as home,
contact, settings, games, browsers are using android framework that uses android runtime and
libraries. Android runtime and native libraries are using linux kernel.
When you use the clipboard architecture, you put data into a clip object, and then put the
clip object on the system-wide clipboard. The clip object can take one of three forms:
Text
A text string. You put the string directly into the clip object, which you then put onto the
clipboard. To paste the string, you get the clip object from the clipboard and copy the string to
into your application's storage.
URI
A Uri object representing any form of URI. This is primarily for copying complex data
from a content provider. To copy data, you put a Uri object into a clip object and put the clip
object onto the clipboard. To paste the data, you get the clip object, get the Uri object, resolve it
to a data source such as a content provider, and copy the data from the source into your
application's storage.
Intent
An Intent. This supports copying application shortcuts. To copy data, you create an Intent,
put it into a clip object, and put the clip object onto the clipboard. To paste the data, you get the
clip object and then copy the Intent object into your application's memory area.
The clipboard holds only one clip object at a time. When an application puts a clip object on the
clipboard, the previous clip object disappears.
If you want to allow users to paste data into your application, you don't have to handle all
types of data. You can examine the data on the clipboard before you give users the option to paste
it. Besides having a certain data form, the clip object also contains metadata that tells you what
MIME type or types are available. This metadata helps you decide if your application can do
something useful with the clipboard data. For example, if you have an application that primarily
handles text, you may want to ignore clip objects that contain a URI or Intent.
You may also want to allow users to paste text regardless of the form of data on the
clipboard. To do this, you can force the clipboard data into a text representation, and then paste this
text
3.8.1 Main_Activity.Xml
<ImageView
android:layout_width="match_parent"
android:layout_height="483dp"
android:src="@drawable/ic_round_log" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/player_position"
android:text="00:00"
android:textStyle="bold"
android:textColor="@android:color/white"/>
<SeekBar
android:layout_width="0dp"
Dept. of IS Downloaded by Likith Pal (likipal460@gmail.com)
Page 15
lOMoARcPSD|26328390
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/seek_bar"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/player_duration"
android:text="00:00"
android:textStyle="bold"
android:textColor="@android:color/white"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="8dp">
<ImageView
android:id="@+id/bt_rew"
android:layout_width="60dp"
android:layout_height="match_parent"
android:src="@drawable/ic_fast_rewind" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:id="@+id/bt_play"
android:src="@drawable/ic_play"/>
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:id="@+id/bt_pause"
android:visibility="gone"
android:src="@drawable/ic_pause"/>
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:id="@+id/bt_ff"
android:src="@drawable/ic_fast_forward"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
3.8.2 MainActivity.Java
package com.example.mediaapp;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
import java.util.concurrent.TimeUnit;
TextView playerPosition,playerDuration;
SeekBar seekBar;
ImageView btRew,btPlay,btPause,btFf;
MediaPlayer mediaPlayer;
Runnable runnable;
@Override
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
playerPosition = findViewById(R.id.player_position);
playerDuration = findViewById(R.id.player_duration);
seekBar = findViewById(R.id.seek_bar);
btRew = findViewById(R.id.bt_rew);
btPlay = findViewById(R.id.bt_play);
btPause = findViewById(R.id.bt_pause);
btFf = findViewById(R.id.bt_ff);
mediaPlayer = MediaPlayer.create(this,R.raw.music);
@Override
seekBar.setProgress(mediaPlayer.getCurrentPosition());
handler.postDelayed(this,500);
};
playerDuration.setText(sDuration);
btPlay.setOnClickListener(new View.OnClickListener() {
@Override
btPlay.setVisibility(View.GONE);
btPause.setVisibility(View.VISIBLE);
mediaPlayer.start();
seekBar.setMax(mediaPlayer.getDuration());
handler.postDelayed(runnable,0);
});
btPause.setOnClickListener(new View.OnClickListener() {
@Override
btPause.setVisibility(View.GONE);
btPlay.setVisibility(View.VISIBLE);
mediaPlayer.pause();
handler.removeCallbacks(runnable);
});
btFf.setOnClickListener(new View.OnClickListener() {
@Override
playerPosition.setText(convertFormat(currentPosition));
mediaPlayer.seekTo(currentPosition);
});
btRew.setOnClickListener(new View.OnClickListener() {
@Override
playerPosition.setText(convertFormat(currentPosition));
mediaPlayer.seekTo(currentPosition);
});
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
if(b){
mediaPlayer.seekTo(i);
playerPosition.setText(convertFormat(mediaPlayer.getCurrentPosition()));
@Override
@Override
});
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
btPause.setVisibility(View.GONE);
btPlay.setVisibility(View.VISIBLE);
mediaPlayer.seekTo(0);
});
@SuppressLint("DefaultLocale")
return String.format("%02d:%02d"
, TimeUnit.MILLISECONDS.toMinutes(duration)
,TimeUnit.MILLISECONDS.toSeconds(duration) -
TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(duration)));
Chapter 4:
SNAPSHOTS
Fig 4.1 :before playing music Fig 4.2 :After Playing music
Conclusion
Media player Activity is developed for users to Play music . It prove the users sound and
thus provides a better user experience.
By this project we get a neat idea of android studio which offers to build automation,
dependency management, and customisable build configurations. You can configure your
project to include local and hosted libraries, and define build variants that include different
code and resources, and apply different code shrinking and app signing configurations. And
also XML which is flexible way to create information formats and electronically share
structured data via the public internet, as well as via corporate networks
In this project we added a speaking assistance , which tells the user had copied text or
not. In future we are implementing an image copy clipboard to it.
Reference
https://www.ibm.com/cloud/learn/mobile-application-development-explained for introduction
https://google-developer-training.github.io/android-developer-fundamentals-course-
concepts/en/android-developer-fundamentals-course-concepts-en.pdf-Concepts
https://www.semanticscholar.org/paper/Design-and-implementation-of-music-player-
based-on-Xiang-Chao/be428163863d120116750db6a6922036918b3890-for design and
implementation.
https://developer.android.com/guide/topics/text/copy-paste - about clipboard framework
and architecture