【正文】
3, java, Eclipse ABSTRACT Today39。MP3 是一種聲音文件的壓縮格式,由于本播放器只限于應(yīng)用層程序的探討,所以對(duì)具體的壓縮算法不做深究。 本論文的音樂播放器采用了 Android 開源系統(tǒng)技術(shù),利用 Java 語言和Eclipse 開發(fā)工具 對(duì)播放器 代碼 進(jìn)行編寫。 畢 業(yè) 設(shè) 計(jì)(論 文) 題 目 基于 Android系統(tǒng)的音樂播放器設(shè)計(jì)與實(shí)現(xiàn) 姓 名 學(xué) 號(hào) 所在學(xué)院 專業(yè)班級(jí) 指導(dǎo)教師 日 期 摘 要 當(dāng)今社會(huì)的生活節(jié)奏越來越快,隨著硬件 移動(dòng)設(shè)備的越來越先進(jìn),人們對(duì)移 動(dòng)設(shè)備的要求也越來越高,從以前的追 求技術(shù)到現(xiàn)在的追求 視覺 效果 及用戶體驗(yàn) ,因此, 也逐步的提高了對(duì)系統(tǒng)的要求。 本文主要是 在 Android 系統(tǒng)上對(duì) 音樂播放器應(yīng)用程序的設(shè)計(jì)與實(shí)現(xiàn)進(jìn)行討論 ,通過這一過程來 進(jìn)一步學(xué)習(xí)與應(yīng)用 Android 平臺(tái) ,這樣對(duì)個(gè)人的未來發(fā)展也很有意義 。同時(shí)給出了詳細(xì)的系統(tǒng)設(shè)計(jì)過程、部分界面截圖及主要的功能流程圖,本文還對(duì)開發(fā)過程中遇到的問題和解決方法進(jìn)行了詳細(xì)的討論,該音樂播放器集播 放、暫停、停止、上一首、下一首、歌詞顯示 、后臺(tái)播放 等功能于一體,性能良好,在 Android 系統(tǒng)中能獨(dú)立運(yùn)行。 實(shí)驗(yàn)證明,基于 Android 平臺(tái) 的軟件 開發(fā)簡單,使用方便簡潔,必將成為未來幾年的發(fā)展方向,具有普遍意義。s increasingly fast pace of life in society, with the hardware of mobile devices bee increasingly sophisticated, people demand more and more mobile devices, high technology from the past to the present pursuit of the pursuit of visual and user experience, therefore, also gradually increased the system requirements. This article is in the Android system, music player application on the design and implementation to discuss the process through which to further study and application of Android, so the future development of personal sense. Music player of this paper uses Android opensource system technology, the use of Java language and Eclipse development tools for the preparation of the player code. At the same time gives a detailed system design process, some interface screenshots and the major function of flow, the paper also encountered in the process of development problems and solutions were discussed in detail, the music player, set play, pause, stop, on one, the next song, lyrics display, background play and other functions, good performance, in the Android system can run independently. MP3 is a pressed audio file format, as the player is limited to the application layer of the program, so not to go into the specific pression algorithm. Experiments show that, based on the Android platform, software development is simple, concise and easy to use, will bee the development direction of the next few years, have universal significance. Keywords: Android, music player, MP3, java, Eclipse 目 錄 摘 要 ............................................................ 2 目 錄 ............................................................. 4 第一章 引言 ......................................................... 1 項(xiàng)目背景 .................................................... 1 編寫目的 .................................................... 2 第二章 系統(tǒng)需求分析 ................................................. 3 功能需求(用例圖分析) ...................................... 3 播放器的基本控制需求 .................................. 3 功能需求(時(shí)序圖)分析 ................................ 4 系統(tǒng)結(jié)構(gòu)圖和流程圖 .......................................... 5 系統(tǒng)界面需求 ................................................ 5 系統(tǒng)性能需求 ................................................ 6 運(yùn)行環(huán)境需求 ................................................ 6 第三章 Android 項(xiàng)目介紹 ............................................. 7 什么是 Android............................................... 7 Android 簡介 ......................... 錯(cuò)誤 !未定義書簽。 .................................. 錯(cuò)誤 !未定義書簽。 Java................................. 錯(cuò)誤 !未定義書簽。 第四章 搭建開發(fā)環(huán)境 ................................ 錯(cuò)誤 !未定義書簽。 下載 SDK 初始包 ....................... 錯(cuò)誤 !未定義書簽。 配置 Android sdk ..................... 錯(cuò)誤 !未定義書簽。 ADT 的使用 ................................. 錯(cuò)誤 !未定義書簽。 第五章 Android 平臺(tái)應(yīng)用程序基礎(chǔ) .................... 錯(cuò)誤 !未定義書簽。 Android 應(yīng)用程序組件 ....................... 錯(cuò)誤 !未定義書簽。 Intent 介紹 ................................ 錯(cuò)誤 !未定義書簽。 Android 的媒體播放原理: ............................. 17 歌曲列表實(shí)現(xiàn)細(xì)節(jié) ..................................... 18 播放功能實(shí)現(xiàn)細(xì)節(jié) ........................................... 21 Service 概念及用途 : .................................. 21 Service 與 Activity 交互原理 .......................... 23 歌詞顯示功能實(shí)現(xiàn) ..................................... 24 其它功能實(shí)現(xiàn)概述 ...................................... 28 來電廣播接收器 ....................................... 28 音量調(diào)節(jié) ............................................. 30 第七章 結(jié)論 ........................................................ 32 致 謝 ............................................................. 34 參考文 獻(xiàn) ........................................................... 35 1 引言 項(xiàng)目背景 自 2021 年 Google 公司推出 Android 以來,一直受到人們的熱捧。 由于手機(jī)市場發(fā)展迅速,使得 手機(jī)操作系統(tǒng)也出現(xiàn)了不同種 類,現(xiàn)在的市場上主要有三個(gè)手機(jī)操作系統(tǒng), Windows mobile, symbian,以及谷歌的 Android操作系統(tǒng)那個(gè),其中占有開源代碼優(yōu)勢的 Android 系統(tǒng)有最大的發(fā)展前景。這使得越來越多的人關(guān)注這個(gè)操作系統(tǒng)。 那么能否在手機(jī)上擁有自己編寫的個(gè)性音樂播放器呢?谷歌的 Android 系統(tǒng)就能做到。 要研究了各種市場上流行的手機(jī)播放器,了解它們各自的插件及編碼方式,還有各種播放器播放的特別文件格式,分析各種編碼方式的優(yōu)缺點(diǎn),以及各種播放器本身的缺點(diǎn)和特點(diǎn),編寫出功能實(shí)用,使用方便快捷的播放器。本項(xiàng)目是一款基于 Android 手機(jī)平臺(tái)的音樂播放器,使 Android 手機(jī)擁有個(gè)性的多媒體播放器,使 手機(jī)顯得更加生動(dòng)靈活化,與人們更為接近,讓手機(jī)主人隨時(shí)隨地處于音樂旋律之中。也使設(shè)計(jì)者更加 熟悉 基于 Android 平臺(tái)的應(yīng)用布局及開發(fā)模式的 特點(diǎn)。 2 系統(tǒng)需求分析 功能需求(用例圖分析) 根據(jù)項(xiàng)目的目標(biāo),我們可獲得項(xiàng)目系 統(tǒng)的基本需求,一下從不同角度來描述系統(tǒng)的需求,并且使用用例圖來描述,系統(tǒng)的功能需求, 播放器的基本控制需 求 。 功能需求(時(shí)序圖)分析 主 界 面播 放 列 表 播 放 界 面后 臺(tái) s e r v ic e點(diǎn) 擊 “ 全 部 歌 曲 ”點(diǎn) 擊 要 播 放 的 歌 曲發(fā) 送 參 數(shù) , 調(diào) 用 后 臺(tái) s e r v ic e播 放 , 并 返 回 信 息 , 更 新 界 面 圖 22 音樂播放器的時(shí)序圖 從以上時(shí)序圖可以看到播放器中消息發(fā)送及調(diào)用 過 程。 系統(tǒng)界面需求 播放器界面要求布局合理, 簡約 , 顏色舒適,控制按鈕友好 ,能讓用戶一眼就能看出各個(gè)按鈕的作用及操作方法 。 要考慮到不同手機(jī)屏幕大小可能不一樣,應(yīng)盡量兼容大多數(shù)手機(jī)屏幕尺寸,使之顯示無障礙。目前,最新版本為 Android Gingerbread 和 Android Honeyb。根據(jù) Android 的軟件框圖,其軟件層次結(jié)構(gòu)自 下而上分為以下幾個(gè)層次: 第一、操作系統(tǒng)層( OS) 第二、各種庫( Libraries)和 Android 運(yùn)行環(huán)境( RunTime) 第三、應(yīng)用程序框架( Application Framework) 第四、應(yīng)用程序( Application) Android 應(yīng)用軟件開發(fā)的 核心技術(shù) Android 應(yīng)用開發(fā)語言 Java