版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、<p> 實現Android手機音樂應用</p><p><b> 摘 要:</b></p><p> Android平臺是谷歌在2007年推出的新一代智能手機平臺。Android提供了對音樂播放的支持,這可能會是廣大開發(fā)商所關注的。所以Android手機串流音樂的發(fā)展需要關注串流音樂到Android手機的HTTP流。Android是開源的并且還提供
2、一個易于使用的開發(fā)工具包。本文為您介紹Android的架構和組件,以及對Android應用的解剖,包括功能的活動、意圖接收器、服務、內容提供商等。這個應用是基于Android的音樂需求(MOD)開發(fā),致力于人們可以隨時隨地簡單方便地訪問和享受他們的數字音樂。該軟件可以直接連接人們的內容,沒有同步或上傳他們的文件的麻煩。音樂需求(MOD)的用戶也可以與家人和朋友在一個私人的,安全的組分享其個人媒體。Rhythm Box分享局域網上的音樂庫
3、,DDAP數據包通過互聯(lián)網發(fā)送到服務器的共享庫。MOD使用數字音頻訪問協(xié)議(DAAP)對共享庫中的音樂實時需求進行響應。</p><p><b> 前 言:</b></p><p> Android是移動設備一個軟件棧,包括操作系統(tǒng),中間件和關鍵應用程序。開放手機聯(lián)盟(OHA)在2007年11月12日發(fā)表了谷歌的Android SDK[1]。這個Android
4、SDK提供了用Java編程語言在Android平臺上開發(fā)應用程序所需的必要的工具和API。</p><p> Android平臺是開放的系統(tǒng)架構,具有多功能的開發(fā)和調試環(huán)境,而且還優(yōu)化了圖形系統(tǒng),支持多種媒體和一個非常強大的瀏覽器,以便支持多種可擴展的用戶體驗。它可以重用,更換部件和有高效率的數據庫支持,并支持各種無線通信手段。它使用了Dalvik虛擬機為移動設備做了很大程度上的優(yōu)化[2]。</p>
5、<p> Android的各種各樣功能如下,Android有它自己基于開源的WebKit引擎的瀏覽器。它支持各種硬件,如GSM、藍牙、EDG、3G、WIFI、相機等。它還支持常見的音頻,視頻和靜止圖像格式(MPEG4、H.264、MP3、AAC、AMR、JPG、PNG、GIF)。</p><p> 由于Android支持Wi-Fi和各種音頻格式,用戶可以從全球IP靈活地訪問和控制音樂的分流。 A
6、ndroid的架構和Android應用程序分析會在第二節(jié)和第三節(jié)中。從遠程臺式機到Android手機流音樂應用程序的設計分析在第四節(jié)中會提到,本文最后部分給出結論和參考文獻。</p><p><b> Android架構</b></p><p> 圖1Android架構</p><p> 上圖是Android架構和它主要的組成部分。<
7、;/p><p><b> 應用程序層</b></p><p> Android附帶了一套核心應用,包括電子郵件客戶端,短信程序,日歷,地圖,瀏覽器,聯(lián)系人等,將在第四節(jié)描述的是在應用層。所有應用程序都使用Java編程語言編寫的。</p><p><b> 應用框架層</b></p><p> 應
8、用程序框架提供了用于創(chuàng)建Android應用程序的類。它還提供了硬件訪問的通用抽象和管理的用戶界面和應用程序資源。Android開發(fā)人員可以核心應用一樣擁有框架API訪問權限。</p><p><b> 核心庫</b></p><p> Android在內核上運行,包括各種C\C++的核心,例如libc和SSL,以及一個用于播放音頻和視頻媒體庫。surface ma
9、nager提供顯示管理,包括SGL和OpenGL的二維、三維圖形的圖形庫,用于網絡瀏覽器和互聯(lián)網安全的SSL和WebKit。</p><p> Android運行時</p><p> Android還包含了一組在Java編程語言核心庫中功能最有用的核心庫。</p><p> 每一個Android應用程序在Dalvik虛擬機中運行。Dalvik可以使應用有效地在
10、移動設備上的虛擬機上運行。Dalvik虛擬機執(zhí)行Dalvik占用最小的內存優(yōu)化文件的可執(zhí)行文件(.dex)。虛擬機是基于寄存器的,并且運行被Java complier的“dx”工具轉化成.dex格式的類。</p><p> Dalvik虛擬機依賴于Linux內核基本功能,例如線程和低級別的內存管理。</p><p><b> Linux內核</b></p&g
11、t;<p> 核心服務(包括硬件驅動程序、過程和內存管理;安全、網絡和電源管理)是由Linux2.6內核的處理。內核還在硬件和堆棧部分之間的提供了抽象層。</p><p> Android應用程序的分析</p><p> 一個Android 應用程序由4個組件組成:Activity、Intent Receiver、Service和Content Provider。并不是
12、每一個應用程序需要這四個組件。但應用程序,都會用到他們當中的一些組合。一旦用戶決定用到哪些組件,就需要在AndroidManifest.xml文件中列出。這是一個XML文件,其中包含用戶為該應用程序聲明的組件和他們的使用范圍和要求[2] [4]。</p><p><b> Activity</b></p><p> Activity是Android四個組件中最常見
13、的。一個Activity通常是應用程序顯示出來的屏幕。每個Activity都繼承了Activity的基類,這個類將顯示用戶界面和響應事件,大多數應用程序有多個屏幕。例如,一個文本消息程序可能有一個屏幕顯示將消息發(fā)送到聯(lián)系人列表。第二個屏幕所選擇的聯(lián)系人寫郵件和其他屏幕查看舊郵件或更改設置,這些屏幕都將會被當做Activity。顯示另外一個屏幕需要啟動一個新的Activity。在在某些情況下可能會返回到前面一個Activity里面的值。例
14、如一個Activity,讓用戶選擇一個照片然后返回選擇照片給被調用的Activity。</p><p> 當一個新的屏幕打開時,先前的屏幕暫停,并放入到歷史堆棧中。用戶可以通過在歷史導航到以前屏幕,在不恰當的時候保存的屏幕可以從歷史堆棧中刪除。Android會保留從主屏幕啟動的每個應用程序的歷史棧。</p><p> Intent Receiver </p><p&
15、gt; Android使用一個特殊的類Intent來移動畫面。Intent描述的是一個應用程序到底想做什么。Intent兩個最重要數據,action和action所需要的數據。最典型的值有:MAIN,VIEW, PICK,EDIT等等。這些數據被表示為一個統(tǒng)一資源標識符(URI)。例如,在瀏覽器中查看網站,將創(chuàng)建具有VEIW值的action和一個網站URI數據的意圖。NewIntent(Android.content.Intent.V
16、IEW_ACTION,ContentURI.create("http://anddev.org"));</p><p> 還有一個相關的叫做IntentFilter的類。當Intent請求做一些事情,IntentFilter會選出怎么樣的Intent(或者Intent receiver,見下文)有能力處理這個Intent。用戶發(fā)布個人信息后,activity經過IntentFilter選出V
17、iew Intent,然后顯示該用戶的聯(lián)系方式。Activity在AndroidManifest.xml文件發(fā)布IntentFilters。</p><p> 畫面的切換是由Intent解析決定的。為了導航到下一個畫面,activity調用startActivity(myIntent)。然后該系統(tǒng)根據IntentFilters安裝應用程序和選擇IntentFilters最佳匹配myIntent的activity
18、。新新的activity啟動由Intent所引起。這個Intent解析過程稱為startActivity時的運行時。</p><p> 想要應用程序執(zhí)行外部事件時可以使用Intent Receiver。例如,當電話鈴響時,或當數據網絡可用時,或當午夜的時候可以使用Intent Receiver。Intent Receiver不會顯示用戶界面,盡管當發(fā)生了一些有趣的事情時Intent Receiver可能會顯示通
19、知提醒用戶。Intent receiver也注冊在AndroidManifest.xml中,但也可以編寫代碼Context.registerReceiver()進行注冊。程序不是一定要對用到的Intent進行調用,當Intent receiver被觸發(fā)時系統(tǒng)會啟動程序。應用程序通過Context.broadcastIntent()可以向他人發(fā)送自己的Intent。</p><p><b> Servi
20、ce </b></p><p> Service是一段周期長沒有用戶界面的代碼。一個很好的例子,就是一個媒體播放器播放列表的歌曲。在媒體播放器這個應用程序,有一個或多個活動,讓用戶選擇歌曲并開始播放。然而音樂播放時不會使用activity,因為用戶希望切換歌曲時只需改變播放的歌曲而不是啟動一個新的界面。在這種情況下,媒體播放器的activity可以開始使用Context.startService()
21、在后臺運行保持音樂服務。系統(tǒng)將會繼續(xù)播放,直到音樂播放完成。(你可以學到更多通過閱讀Life Cycle of an Android Application你會知道service優(yōu)先級)。請注意,你可以連接到一個service(并啟動它,如果它尚未運行)通過Context.bindService()方法。當連接到一個service,service通過接口進行傳遞。音樂播放這個service,就可以實現暫停,重播等。</p>
22、<p> Content Provider</p><p> 應用程序可以在文件中存儲數據,SQLite數據庫,參數或其他有意義的機制。當需要應用程序的數據將與其他應用程序共享時,content Provider將會很有用。content provider是一個類,這個類實現了一系列標準的方法,這些方法可以讓其他應用程序存儲和檢索那些被content provider處理過的數據。</p&g
23、t;<p> MUSIC ON DEMAND–Android音樂應用程序</p><p> 現在可用的方案中,人們收藏音樂是通過吧音樂存到手機的存儲卡中。這是個讓人忙碌和單調乏味的工作。為了克服這一問題并且實現得到用戶希望想要聽的歌曲后搜索到這個歌曲,這就是這個應用程序需要實現的。</p><p> 有了這個系統(tǒng),用戶將能夠在任何地方的共享媒體文件(臺式機/筆記本電腦)
24、。要做到這一點,用戶需要的僅僅是一個互聯(lián)網連接,然而互聯(lián)網如今已經是非常普及了。</p><p> 用戶不需要真正公開分享音樂文件就能夠分享到音樂。請求的客戶端將能夠發(fā)揮不從自己的工作站或Android手機的媒體播放音樂,而是將文件復制到他們的系統(tǒng)。分析用戶簡介后,用戶列表的朋友可以有保持各自的共享媒體的訪問。每當用戶給出一個請求,請求就會被經過驗證的用戶賬戶分享的系統(tǒng)抓取并且然后流回到發(fā)出請求的客戶端系統(tǒng)。因
25、此,服務器不需要特別大的數據存儲空間。該應用程序由三個主要組成部分:</p><p><b> 桌面客戶端界面</b></p><p> 客戶機應用程序界面,這是與服務器進行通信的唯一目的而設計的。它作為媒體播放器和服務器之間的調解人。用戶可以通過此接口創(chuàng)建他/她的私人帳戶。該接口也將開展通過互聯(lián)網流媒體音頻文件的任務。流媒體協(xié)議實際上是這個接口和服務器之間的工作
26、。</p><p> 圖2 接口用于Rhythm boplayer和服務器之間的通信。</p><p> Android客戶端</p><p> Android移動平臺上類似的界面。用戶是不能夠分享到Android手機的媒體。接口將只接收流媒體,并在Android手機上的播放器中播放。</p><p> 文件會在從共享文件列表中順序播
27、放。用戶可以隨機地要求任何音頻文件,該文件都會同步播放。</p><p> 圖3 Android應用程序的流媒體音樂和共享音樂庫列表</p><p><b> 服務器</b></p><p> 它執(zhí)行了兩次大的操作,從客戶端獲取,分流到另一個客戶端并且從桌面客戶端存儲整個音樂序列。服務器通過全球IP進行所有的通信。</p>
28、<p><b> 圖4系統(tǒng)架構</b></p><p> 上圖顯示music on demand這個系統(tǒng)在Android手機上詳細的視圖。上圖所示和之前解釋的,這個系統(tǒng)由三個主要組成部分客戶端,服務器和Android手機應用。進一步解釋三個組成部分之間的實際溝通的細節(jié)是如何發(fā)生的。</p><p> 桌面客戶端接口和Rhythmbox音樂媒體播放器之間
29、的消息流。(我們使用libopendaap library/API用于rhythmboxDAAP之間的通信)。</p><p> 1.首先,創(chuàng)建一個將確定本地的DAAP客戶,這個將會定義到DAAP共享中。</p><p> 2.然后連接到本地的DAAP共享,忽略從本地網絡中其他的DAAP的共享。</p><p> 3. DAAP給本地Rhythm播放器提出請求
30、,如下:</p><p> 客戶端的Rhythmbox說明</p><p> ---/server-info---->請求服務器</p><p> <------- MSRV-------服務器響應</p><p> ---/content-codes-->要求的內容</p><p> &l
31、t;------- mccr-------響應內容</p><p> ---/login---------->登錄</p><p> <------- mlog-------登錄響應</p><p> ---/update--------->更新請求</p><p> <------- mupd-------更
32、新回應</p><p> ---/databases------>數據庫請求</p><p> <------- avdb--------數據的基礎上響應(DBID)</p><p> ---/db/id/items---->請求的歌曲</p><p> <------- ADBS-------數據庫中的歌曲列
33、表</p><p> -/db/id/containers->請求播放列表</p><p> <-------apply-------列出數據庫中的播放列表</p><p> 4.如果歌曲請求了由服務器,消息流如下:</p><p> -/db/id/items/<ID> .MP3->請求MP3。<
34、/p><p> <--stream-mp3-file------- 播放mp3</p><p> 桌面客戶端界面和服務器之間的消息流</p><p><b> 1.消息流如下:</b></p><p><b> 客戶端服務器說明</b></p><p> ----
35、- MRTT------>包的往返響應超時</p><p> <------- MRTT-------服務器響應</p><p> -------- mlog----->登錄包的訪問權限。</p><p> <------- MLRP-------登錄響應(用戶ID)</p><p> --------- MS
36、RV---->本地機器描述</p><p> <-------OK-------服務器響應</p><p> --------- SNIF------>歌曲名單(10首歌曲/包)</p><p> <------OK-------服務器響應</p><p> --------- SNIF------>&l
37、t;/p><p> <------OK-------</p><p> 2.客戶正在登錄,等待來自服務器的任何請求。</p><p> 3.當服務器請求一首歌的消息流如下:</p><p><b> 客戶端服務器說明</b></p><p> <-------的STRM-----
38、-歌曲請求(歌曲ID)</p><p> --------- STRP------>歌曲答復</p><p> <------- OK -------服務器響應</p><p> ----- STREAM --->歌曲的實際流量</p><p> <------- OK -------服務器響應</p&g
39、t;<p> Android客戶端和服務器之間的消息流</p><p><b> 1.消息流如下:</b></p><p> Android的服務器說明</p><p> --------- MRTT------>往返時間超時計算</p><p> <------- MRTT-----
40、--服務器響應</p><p> -------- mlog----->登錄數據包進行驗證</p><p> <------- MLRP-------登錄響應(用戶ID)</p><p> --------- msrq---->共享庫的請求</p><p> <------- MSRP-------共享庫名單&
41、lt;/p><p> 2.當一個特定的庫被選中,那么消息流如下:</p><p> Android的服務器說明</p><p> --------- snrq------>歌曲的請求</p><p> <------- snrp-------歌曲和元數據</p><p> 3.當點擊消息播放一首歌曲是
42、:</p><p> Android的服務器說明</p><p> -------- STRM------>歌曲請求(歌曲ID)</p><p> <-------- STRP------播放答復(HTTP播放路徑)</p><p> 圖5 從桌面客戶端到Android手機的音樂播放</p><p>
43、; 從上圖中我們可以看到,執(zhí)行播放通過使用的DAAP和Rhythmbox使用全球IP到Android手機是很方便的。</p><p><b> 結 論 </b></p><p> 我們喜歡各種各樣音樂,當然,我們有4000 +的歌曲集,這些我們并不能的全部放到自己的Android手機上。也不能放到我們的朋友那邊。然而,Music On Demand可以讓你點播
44、你的朋友的歌曲集合,無論你在哪里且不會占用超過1MB的空間。這個應用程序,可以聽任何你收藏的音樂。不僅僅是自己的收藏音樂,你也可以邀請朋友成為你的朋友列表和來播放他們的音樂。</p><p> 這是一個非常簡單的應用程序,并且可以在Android上的播放媒體音樂,因此它的名字是Rayss Tunes。第一步是在桌面上運行的桌面客戶端界面應用程序。這個可以作為進入你的音樂庫的通徑。第二步是在你的Android手機
45、上安裝應用Rayss Tunes。一旦你在這兩個位置以相同的用戶名和密碼登錄,你的本地音樂庫將可以在你Android手機中使用。你還可以得到任何已經邀請為你的朋友的Music on Demand網絡上的音樂。絕對沒有其他陪著你,只是登錄應用程序就好了。</p><p> Rayss Tunes一個非常簡單的應用程序,很方便。安裝桌面應用程序,然后安裝Android應用程序、登錄、然后音樂就有了。添加你的朋友,你
46、可以給他們一個請求,如果他們接受,你就能看到他們的音樂。</p><p> 因此,這個應用程序讓用戶點擊用戶想聽的音樂和快速播放音樂和專輯,這就是了這個應用程序的使用。</p><p><b> 參考文獻</b></p><p> [1] Open Hanset Alliance, http://www.openhandsetallian
47、ce.com/.</p><p> [2] Android-An Open Handset Alliance Project, http://code.google.com-/intl/zh-CN/Android/.</p><p> [3] OpenDAAP Library- http://crazney.net/programs/itunes/libopendaap.html.&l
48、t;/p><p> [4] http://andbook.anddev.org.</p><p> [5] C. Haseman,Android Essentials, PDF Electronic Book, 2008. Available from: http://Androidos.cc/dev/index.php.</p><p> [6] http://
49、www.developer.Android.com.</p><p> A Novel approach for streaming music to Android phone through Global IP using DAAP</p><p> Vishal A. Kamble; Annasaheb Dange College of Engineering and Techn
50、ology; Dept of Computer Science; Ashta, India.</p><p> Amol S. Dange; Annasaheb Dange College of Engineering and Technology; Dept of Computer Science; Ashta, India.</p><p> Sachin P. Yadav; An
51、nasaheb Dange College of Engineering and Technology; Dept of Computer Science; Ashta, India.</p><p><b> ABSTRACT </b></p><p> Android platform is new generation of smart mobile pho
52、ne platform launched by Google in 2007.Android provides support to music streaming, which is probably a concern of vast number of developers. So as the development of music streaming to Android phone is concern its need
53、an http streams to stream music to Android phone. Android is an open sources and providing an easy to use development kit. This paper introduce you the Architecture and components of Android and analyzes the anatomy of A
54、ndroid</p><p> INTRODUCTION </p><p> Android is a software stack for mobile devices that include an operating system, middleware and key application. The Open Handset Alliance (OHA) released t
55、he Google Android SDK on November 12, 2007 [1]. The Android SDK provides the tools and APIs necessary to begin developing application on the Android platform using Java programming language. </p><p> Androi
56、d platform is of open system architecture, with versatile development and debugging environment, but also supports a variety of scalable user experience, which has optimized graphics systems, rich media support and a ver
57、y powerful browser. It enables reuse and replacement of components and an efficient database support and support various wireless communication means. It uses a Dalvik virtual machine heavily optimized for mobile devices
58、 [2]. </p><p> The Various feature of Android are as fallow, Android have its own browser based on open source WebKit engine. It has various hardware dependent feature lke GSM, Bluetooth, EDGE, 3G, WiFi, Ca
59、mera etc. It has media support for Common audio, video, and still image formats (MPEG4,H.264,MP3,AAC,AMR,JPG,PNG,GIF) </p><p> As the Android support the Wi-Fi and various audio format user can flexibly acc
60、ess and control the streaming of music from a Global IP. The Android architecture and anatomy of Android application are addressed in Section II and III. Based on the analyses, the design of Streaming application to stre
61、am music from remote desktop machine to Android phone is then presented in section IV and the last section gives the conclusion and various references.</p><p> ANDROID ARCHITECTURE</p><p> Fig
62、ure 1 Android architecture</p><p> The Android architecture and its main components are shown in above Figure 1.</p><p> Application Layer</p><p> Android will ship with a set of
63、 core applications including an email client, SMS program, calendar, maps, browser, contacts, and others even the application, which will be described in Section IV is in application layer. All applications are written u
64、sing the Java programming language.</p><p> Application Framework</p><p> The application framework provides the classes used to create Android applications. It also provides a generic abstrac
65、tion for hardware access and manages the user interface and application resources. Developers have the full access to same framework APIs used by the core application. </p><p><b> Libraries</b>&
66、lt;/p><p> Running on top of the kernel, Android includes various C\C++ core libraries such as libc and SSL as well as, A media library for playback of audio and video. A surface manager to provide display man
67、agement, Graphics libraries that include SGL and OpenGL for 2D and 3D graphics, SQLite for native database support, SSL and WebKit for integrated web browser and internet security.</p><p> Android Runtime&l
68、t;/p><p> Android includes a set of core libraries that provides most of functionality available in the core libraries of the Java programming language. </p><p> Every Android application runs in
69、 its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run mobile VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is
70、 optimized for minimal memory footprint. The VM is register-based, and runs classes complied by Java language complier that have been transformed into the .dex format by the included “dx” tool. </p><p> The
71、 Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management. </p><p> Linux Kernel</p><p> Core services (including hardware drivers, p
72、rocess and memory management, security, network, and power management) are handled by a Linux 2.6 kernel. The kernel also provides an abstraction layer between the hardware and the remainder of the stack. </p><
73、;p> ANATOMY OF ANDROID APPLICATION</p><p> There are four building blocks to an Android application: Activity, Intent Receiver, Service, and Content Provider Not </p><p> Every application
74、 needs to have all four, but user application will be written with some combination of these. Once user has decided what components he need for his application, he should list them in a file called AndroidManifest.xml. T
75、his is an XML file where user declares the components of user application and what their capabilities and requirements are[2][4]. </p><p><b> Activity</b></p><p> Activities are th
76、e most common of the four Android building blocks. An activity is usually a single screen in your application. Each activity is implemented as a single class that extends the Activity base class. Your class will display
77、a user interface composed of Views and respond to events. Most applications consist of multiple screens. For example, a text messaging application might have one screen that shows a list of contacts to send messages to,
78、a second screen to write the message to the</p><p> When a new screen opens, the previous screen is paused and put onto a history stack. The user can navigate backward through previously opened screens in t
79、he history. Screens can also choose to be removed from the history stack when it would be inappropriate for them to remain. Android retains history stacks for each application launched from the home screen.</p>&l
80、t;p> Intent Receiver </p><p> Android uses a special class called Intent to move from screen to screen. Intent describes what an application wants done. The two most important parts of the Intent data s
81、tructure are the action and the data to act upon. Typical values for action are MAIN (the front door of the application), VIEW, PICK, EDIT, etc. The data is expressed as a Uniform Resource Indicator (URI). For example, t
82、o view a website in the browser, you would create Intent with the VIEW action and the data set to a Website-</p><p> NewIntent(Android.content.Intent.VIEW_ACTION,ContentURI.create("http://anddev.org&qu
83、ot;)); </p><p> There is a related class called an IntentFilter.While an Intent is effectively a request to do something, an Intent filter is a description of what Intents an activity (or Intent receiver, s
84、ee below) is capable of handling. An activity that is able to display contact information for a person would publish an IntentFilter that said that it knows how to handle the action VIEW when applied to data representing
85、 a person. Activities publish their IntentFilters in the AndroidManifest.xml file. </p><p> Navigating from screen to screen is accomplished by resolving Intents. To navigate forward, an activity calls star
86、tActivity(myIntent). The system then looks at the Intent filters for all installed applications and picks the activity whose Intent filters best matches myIntent. The new activity is informed of the Intent, which causes
87、it to be launched. The process of resolving Intents happens at run time when startActivity is called. </p><p> You can use an Intent Receiver when you want code in your application to execute in reaction to
88、 an external event, for example, when the phone rings, or when the data network is available, or when it's midnight. Intent receivers do not display a UI, although they may display Notifications to alert the user if
89、something interesting has happened. Intent receivers are also registered in AndroidManifest.xml, but you can also register them from code using Context.registerReceiver(). Your application </p><p><b>
90、 Service </b></p><p> A Service is code that is long-lived and runs without a UI. A good example of this is a media player playing songs from a play list. In a media player application, there would pr
91、obably be one or more activities that allow the user to choose songs and start playing them. However, the music playback itself should not be handled by an activity because the user will expect the music to keep playing
92、even after navigating to a new screen. In this case, the media player activity could start a service u</p><p> Content Provider </p><p> Applications can store their data in files, a SQLite da
93、tabase, preferences or any other mechanism that makes sense. A content provider, however, is useful if you want your application's data to be shared with other applications. A content provider is a class that impleme
94、nts a standard set of methods to let other applications store and retrieve the type of data that is handled by that content provider. </p><p> MUSIC ON DEMAND–STREAMING APPLICATION FOR ANDROID</p>&l
95、t;p> In present available schemes, people take on and off their music collection from phone memory, which is really a hectic and tedious job. To overcome this and to get user what he wants to listen and tap his feet
96、on music, this application is implemented [3][5][6] .</p><p> With this system, user will be able to share the media files from anywhere (Desktops/Laptops).To do so, what user needs is just an Internet conn
97、ection, which is common these days. </p><p> User will be able to share the media without actually sharing the files publicly. The requesting clients will be able to play the media from their workstation or
98、 Android Phone without actually copying the files to their system. Proper user profiling is done and friend list of the users is maintained to get access of the respective shared media. </p><p> Whenever a
99、user requests for a track, it will be fetched from the system on which it is shared under the authenticated users account and then streamed back to the requesting client. So the server need not have exceptionally large d
100、ata storage space. There are three main components of this system- </p><p> Desktop Client Interface </p><p> The application interface for the client machine, which is designed for the sole p
101、urpose of communicating with the server. It is acting as mediator between the media player and the server. </p><p> The user is able to create his/her private account through this interface. This interface
102、will also carry out the task of streaming the audio files through internet. The streaming protocol is actually working between this interface and server.</p><p> Figure 2 Interface for communicating between
103、 Rhythm boplayer and Server.</p><p> Android Client </p><p> The similar interface on the Android mobile platform. The user is not able to share the media from the Android phone. The interface
104、 will just receive the streamed media and play it using the media player on the Android mobile. </p><p> The files will be played sequentially from the list of shared files. The user can demand any audio fi
105、le randomly. The file will be streamed and played simultaneously.</p><p> Figure 3 Android applications for streaming music and to get the list of shared music library</p><p> The Server </
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 實現android手機音樂應用-畢業(yè)論文外文翻譯
- 實現android手機音樂應用【中文4540字】
- 實現android手機音樂應用【中文4540字】
- android手機外文翻譯---應用程序基礎android developers
- android應用架構外文翻譯
- android手機圖像瀏覽軟件畢業(yè)設計(含外文翻譯)
- android手機圖像瀏覽軟件畢業(yè)設計(含外文翻譯)
- android手機圖像瀏覽軟件畢業(yè)設計(含外文翻譯)
- android手機地圖應用開發(fā)
- 基于Android的手機音樂播放器的設計與實現.pdf
- 外文翻譯---應用程序基礎android developers
- android系統(tǒng)外文翻譯
- android起航外文翻譯
- 基于Android手機的校園應用的設計與實現.pdf
- 基于Android的手機電子書閱讀器的設計與實現外文翻譯.doc
- android手機地圖應用開發(fā)論文
- 畢業(yè)設計--基于 android 平臺的手機應用開發(fā)—音樂播放器
- 基于Android的手機通訊協(xié)議應用研究與實現.pdf
- 基于Android平臺的手機地圖應用研究與實現.pdf
- android手機地圖應用開發(fā)論文.doc
評論
0/150
提交評論