Media Player Report.pdf

October 3, 2017 | Author: vivek | Category: Android (Operating System), Smartphone, Operating System, Software, Media Technology
Share Embed Donate


Short Description

Download Media Player Report.pdf...

Description

Android Media Player A PROJECT REPORT Under the guidance of

Mr. Faiz Sir

Submitted by: Name

Reg. No.

SUDHANSHU KUMAR

121250110232

NILAM KUMARI PRIYANKA PRIYADARSHANI

In partial fulfillment of the requirement For the award of the degree Of

B.tech

1

Acknowledgement We are extremely grateful to Mr. Faiz Sir, Faculty of Center for his valuable guidance all through our project work. His heartiest & kind Cooperation during my project work makes the dream real & we succeed to complete our project Report. At the outset we would like to express my deepgratitude to all co-ordinator of the institute for their help and support. Last but not least, we are very much grateful toour parents and personal tutor. Providing the proper guidance& advice to complete our project work.

Name

Unv. Roll

SUDHANSHU KUMAR NILAM KUMARI PRIYANKA PRIYADARSHANI

2

121250110232

CONTENTS

1) Main Report: 1.1 Introduction 1.2 Objective, Scope 1.3 Interface of Android 1.4 Android Versions 1.5 Symbols of Android OS 2) Media Player 1.1 Introduction 1.2 1.3

1.4

Objectives Functional requirements Playlist menu

3) Interface of Media Player 4) Notification & Open Notification 5) Input and Output screen design 6) Hardware Requirements 7) Source Code 8) Bibliography

3

Main Report INTRODUCTION… This project is associated with any Android Media Player. The Project is as per the required curriculums of the B.Tech. Android Introduction… • Android is an operating system based on the Linux kernel, and designed primarily for touch screen mobile devices such as Smartphone’s and tablet computers. • Android allows users to customize their home screens with shortcuts to applications and widgets, which allow users to display live content, such as emails and weather information, directly on the home screen. Purpose… Explains the functional features, design… Scope… This application can run anonymously in any Android based Smartphones, not less than version 2.3.5 Objectives… • Application will be written using Android SDK in Java and should run on all Android OS handsets. • The application will play audio files with format of MP3, AAC, 3GP, M4A, MIDI, RTX, OGG, and WAV. • The application will play video files with format of 3GP, MP4, WEBM. • Background playing options. • Notification on the home screen. • Android is open source and Google releases the code under the Apache License. • Android has a large community of developers writing applications ("apps") that extend the functionality of devices, written primarily in the Java programming language

4

• Android is the world's most widely used smart phone platform,[overtaking Symbian in the fourth quarter of 2010. Android is popular with technology companies who require a ready-made, lowcost, customizable and lightweight operating system for high tech devices. • Despite being primarily designed for phones and tablets, it also has been used in televisions, games consoles, digital cameras and other electronics.

Interface of Android…

• The user interface of Android is based on direct manipulation, using touch inputs that loosely correspond to real-world actions, like swiping, tapping, pinching and reverse pinching to manipulate onscreen objects.

5

• Android home screens are typically made up of app icons and widgets; app icons launch the associated app, whereas widgets display live, auto updating content such as the weather forecast, the user's email inbox, or a news ticker directly on the home screen.

6

Android versions • Android 1.0 (API level 1) • Android 1.1 (API level 2) • Android 1.5 Cupcake (API level 3) • Android 1.6 Donut (API level 4) • Android 2.0 Éclair (API level 5) • Android 2.1 Éclair (API level 7) • Android 2.2–2.2.3 Froyo (API level 8) • Android 2.3–2.3.2 Gingerbread (API level 9) • Android 2.3.3–2.3.7 Gingerbread (API level 10) • Android 3.0 Honeycomb (API level 11) • Android 3.1 Honeycomb (API level 12) • Android 3.2 Honeycomb (API level 13) • Android 4.0–4.0.2 Ice Cream Sandwich (API level 14) • Android 4.0.3–4.0.4 Ice Cream Sandwich (API level 15) • Android 4.1 Jelly Bean (API level 16) • Android 4.2 Jelly Bean (API level 17) • Android 4.3 Jelly Bean (API level 18) Android 4.4 KitKat (API level 19)

Symbols of android OS

7

Media Player Introduction…

Media Player is android application that can play various audio and video files. To make use of android OS with more public interest and make it more users friendly so all can use it. This project is to design and implement platform independent media player which can play most of the audio files like .mp3, .wav etc. and some video files in addition to view images. Objectives… • Application will be written using Android SDK in Java and should run on all Android OS handsets. • The application will play audio files with format of MP3, AAC, 3GP, M4A, MIDI, RTX, OGG, and WAV. • The application will play video files with format of 3GP, MP4, WEBM. • Background playing options. • Notification on the home screen. Functional requirements… • Android operating system on the Smartphone. • The target device should be sound enabled. • Ability to play Audio file • Ability to play Video File • Welcome Screen • Main Screen • Player Screen Playlist menu… • Play • Stop • Pause • Songs list • Next • Previous

External interface requirements

• User Interface Tested on Android emulator version 4.3 Any device which have android platform 8

• Hardware Requirement Core i3 processor 4 GB RAM 500 GB • Hard Disk Software Requirement Android SDK Manager Eclipse ADT(Android Development Tool)

Source Code Media Player…

package com.hp.cjanapp; import java.io.File; import import import import import import import import import import import import import import

android.app.Activity; android.graphics.drawable.AnimationDrawable; android.media.MediaPlayer; android.os.Bundle; android.os.Environment; android.view.Menu; android.view.MenuItem; android.view.View; android.view.View.OnClickListener; android.widget.Button; android.widget.RelativeLayout; android.widget.SeekBar; android.widget.TextView; android.widget.SeekBar.OnSeekBarChangeListener;

public class MusicPlayer extends Activity implements OnClickListener,OnSeekBarChangeListener { Button play, pause; static MediaPlayer player; TextView cd, td; SeekBar mpseek; Thread autoseek; 9

RelativeLayout ms; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_music_player); play = (Button)findViewById(R.id.play); pause = (Button)findViewById(R.id.pause); cd = (TextView)findViewById(R.id.mpcd); td = (TextView)findViewById(R.id.mptd); mpseek = (SeekBar)findViewById(R.id.mpsb1); mpseek.setOnSeekBarChangeListener(this); ms = (RelativeLayout)findViewById(R.id.musicscreen); play.setOnClickListener(this); pause.setOnClickListener(this); if(player==null){ //player = MediaPlayer.create(this,R.raw.mymusic); try{ File sdcard = Environment.getExternalStorageDirectory(); String sp = sdcard.getPath()+"/chandsifarish.mp3"; player = new MediaPlayer(); player.setDataSource(sp); player.prepare(); }catch(Exception e){} } mpseek.setMax(player.getDuration()); td.setText(convert(player.getDuration())); autoseek = new Thread() { public void run() { while(true) { mpseek.setProgress(player.getCurrentPosition()); } } };//END OF THREAD autoseek.start(); } 10

@Override public void onClick(View v) { // TODO Auto-generated method stub ms.setBackgroundResource(R.animator.visual); final AnimationDrawable anim = (AnimationDrawable) ms.getBackground(); if(v.getId()==R.id.play){ player.start(); ms.post(new Runnable() { @Override public void run() { anim.start(); } }); } else{ player.pause(); ms.post(new Runnable() { @Override public void run() { anim.stop(); } }); } } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { // TODO Auto-generated method stub if(fromUser==true){ player.seekTo(progress); } cd.setText(convert(progress)); } @Override public void onStartTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub

11

} @Override public void onStopTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } //CONVERT DURATION TO DISPLAY String convert(long duration){ String ttd=""; duration = duration/1000; ttd = (duration/60)+" : "+(duration%60); return ttd; } }

Interface of Media Player

12

Notification & Open Notification

BIBLIOGRAPHY HP EDUCATION SERVICES (INDIA) http://www.hpesindia.com http://developer.android.com http://www.tutorialspoint.com/android/

thank you

13

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF