音樂播放器翻譯_第1頁
音樂播放器翻譯_第2頁
音樂播放器翻譯_第3頁
音樂播放器翻譯_第4頁
音樂播放器翻譯_第5頁
已閱讀5頁,還剩20頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

英語原文MusicPlayerThemusicplayerisaplayersoftwareformultimediaplayallkindsofmusicfiles.Itcoversavarietyofmusicformatplayer,suchas:MP3player,WMAplayer,MP4playeretc..Theyarenotonlybeautifulinterface,andtheoperationissimple,takeyouintoaperfectmusicspace.MusicplayersoftwareVisualinterfacemusicplayeristheaudiodecoder,itsessenceisaimedatallkindsofaudiocodingformatdecoder.Forexample,apeformatiscalledMonkey'sAudiodecoder,FLACformatiscalledFLACdecoder,MP3callthelamedecoder.Mostofthemusicplayersupportsavarietyofmusicfileformat,itisbecausetheseplayerswillaudiodecoderdifferentpackingup,andmakingthesameplayerinterface,sothatuserscaneasilyplayandlistentoallkindsofmusic.Becauseofthemusicplayerisjusttheaudiocodecpack,andthesamekindofaudiodecodingmethodisfixed,sointheoryallplayerqualityshouldbeexactlythesame,doesnothavethebestsoundqualitymusicplayer.SomeofthemusicplayerwilladdpluginsinDSPdecoderbasedon,convertanddistortionsoftheoriginalmusic,tocatertothepreferencesofthepeople(suchasstrengtheningthebassorfilterdetails),calledoptimalsoundqualityinordertoobtainthesoundofnature,essenceisdestroyingtheoriginalmusic,althoughitcanmakesomemusicsoundsbetter,butalsoresultedinsomeothermusicsoundqualitygreatlyreduced.Themusicplayerofthehumaninterfaceandscalabilityisthecharacteristicsofvariousmusicplayer.Mostofthecommercialversionofplaybacksoftwarewilloftencreateverybeautifulinterface,operationisverysimple,butthelackofscalability,supportformatless.Opensourcesoftwareingeneralplaybetterabletoexpand,moresupportmusicformat,butoftentheinterfacesimple,itisdifficulttoattractusers.CommonmusicplayersoftwarePCterminalFoobar2000:apowerfulplayer,currentlyplayingextendedthebestplayer.KKBOX(charge):onlinemusicplayer,withmillionsofrecordslicensedmusicondemand.TTplayer:installedcommonplayer,thedomesticwell-knownfreemusicplayersoftware.Cooldog:apopularfreeChineseplayersoftware.Cool:athawsongsandMVsearch,onlineplay,synchronizedlyricsforthewholemusicpolymerizationplayer.QQMusic:awonderfulmusictorecommendfunctionalplayer.Winamp:theoldclassicmusicplayersoftware,strongexpansion.InadditiontothefollowingplayerperformanceisexcellentAIRPLAY(Fei):Leanslim,claimingtobethesmallestplayer,bettersoundquality,compressedfilelosslessplayback,andhaveavarietyofvisualeffects,isthelocalplaybackofmusicselection.BeoPlayer:tothesoundqualityisverygoodplayer,correspondingpaymorememory,chargesoftware(therearefreeversion),simpleinterface.JETAUDIO:integratedmultimediaplayer,withsoundeffect,SouthKoreaCOWONcompanylaunchedmorefunctional,beautifulinterface,easytooperate,isawonderfulworkofmultimediaplayer.ITunes:AppleCorp'smusicplayersoftware,withthehelpofApplelargemusicdatabase,itsmusicmanagementfunctionquitewell.Thenthesongthedesktopversion:theneedtoopenthenetworkstate.InterfaceisaFlashinterface,andthenetworkversionalsosongruninthesamegroove.Simple,practical,strongmusiclibrary.Smallshrimpplayer:smallshrimpnetsplayer,simpleinterface,andaddtheirclosedP2Pfunctionlibrary,thequalityandvolumeoflower192KMP3format,convenientonlinelistentomusic.YoYoPlayer:javaopensourcedevelopmentplayer.BasedonJavadevelopment,soitcanbenormallyusedinthelinuxseriesoperatingsystem.Meters(DuoMi):Duomiwhetherlocalbroadcastoronlineplaycandownload,supportMV,butsometimescan'tfindmetersmusicapplicationfolder,sowhenusingthemetersmusicbestcreateadesktopshortcut.Sogoumusicbox:Sogounetworkmusicbox,relyingontheSogousearchtechnology,createdtheclosedP2Pdownloadtechnology,searchdogmusicbox(desktop)isamusicplayersoftware.AIMP3:isaRussianfreemusicplayersoftware,musicmanagementsystembetter,tosupporttheskin.MobilephoneterminalCooldogmobilephoneCooldogmobilephoneedition,oneofthecommonmobilephonemusicplayer.DingDong(formerlyknownasmobilephonecooldog)isafreemusicsoftware.Beautifulinterfacebringsmusicaudio-visualenjoyment,withCaraOKlyricsverbatimsynchronizedplayback,supportfull-screensingerbackgroundpicture.QQmobilephonemusicplayerQQmusicplayerformobilephoneversion,playingpopmusic.Thisisamusicrecommendationfeatureplayer,listentomusicandboring,alsosupportonlineplaymusicandlocalmusic,isthedomesticcontentthantherichmusicplatform.Musicsearchandrecommendationfunctionallowsuserstoenjoyfashionable,beautifulmusic.HappytolistenThemobilephonesmartimprovemobilephonemusicplayer,designedforyoungpeopletomobilephonemusicplayersoftware.Happytohearisafreemobilephonemusicplayer,hasgoodacoustics,supportatanytimetoplay,search,download,andcanautomaticallymatchthelyricsandthealbumpictures,withintelligentmusiclibrary,combinedwithdynamicalbum,rejectionsongsandotherfunctions,letmobilephonebecomesimilariPodtools.TTPODLedbytheuserdemandformobilephoneusersplayer,putideasintoone,homebredmobilephonemusicplayersoftware.Thisisafreemobilephonemusicplayersoftware,supportthelyricsandthesongdownloadpictures,theskincanbereplaced,withavarietyofvisualeffect,atthesametimepresetmultipleequalizereffect,supportaudioenhancement,simpleoperation,goodexperiencetobringmobilephonemusic,musicisacommonfamilythumbplayingtool.MusicfileformatCommonmusicfileformatMP3formatMP3istheabbreviationofMovingPictureExpertsGroupAudioLayerIII.Isakindofaudiocompressiontechnology,becauseofthiscompressionmethodiscalledMPEGAudioLayer3,sopeoplecallitasMP3.Becauseoftheage,thesamerateofsoundqualityispoor,eventhe192Krateisfarlessthanthe96kAACformat,isfacingeliminationdestiny.WMAformatWMAistheabbreviationofWindowsMediaAudio,isakindofaudioformatsMicrosoftpushing.WAVformatTheWAVformatistheMicrosoftCorptodevelopasoundfileformat,alsocalledwavefile,istheearliestdigitalaudioformat,widelysupportedbytheWindowsplatformanditsapplication.OthermusicfileformatASFformatASFistheabbreviationofAdvancedStreamingFormat,isamediaMicrosoftthebroadcastformat,suitableforplayinginthenetwork.AACformatAACistheabbreviationforadvancedaudiocoding.TheAACisanaudioformatdevelopedbyFraunhoferIIS-A,DolbyandAT&T,whichispartoftheMPEG-2specification.Mp3ProformatTheMp3ProistheupgradedversionoftheMp3codingformat.VQFformatTheVQFformatisanaudiojointlydevelopedbyYAMAHAandNTTcompressiontechnology.FLACformatFLACisFreeLosslessAudioCodecabbreviation,Chinesesolutionforlosslessaudiocompressioncoding.APEformatAPEisoneoftheearlypopulardigitalmusicfileformat.WiththisMP3lossycompressionindifferentways,APEisalosslessaudiocompressiontechnology.MIDformatMIDIistheEnglishMusicInstrumentDigitalInterfaceabbreviation,whichtranslatesto"digitalinstrumentinterface".OGGformatThefullnameofOggisOGGVobis(OggVorbis)isanewkindofaudiocompressionformat,similartotheMP3andotherexistingmusicformat.Butonethingisdifferent,itiscompletelyfree,openandnopatentrestrictions.M4AformatM4AisaMPEG4audiostandardfileextension.MentionedintheMPEG4standard,thegenericMPEG4fileextension.Mp4.eAAC+Theeaac+formatistheoptimizationofanewgenerationofappliedtomobilephonemusicformat.Theeaac+extensionM4A.ItcanbeclosetothesoundqualityoftheCD,thanMP3formatoccupieslessstoragespace.譯文:音樂播放器音樂播放器是一種用于播放各種音樂文件的多媒體播放軟件。它涵蓋了各種音樂格式的播放工具,比如:MP3播放器,WMA播放器,MP4播放器等。它們不僅界面美觀,而且操作簡單,帶你進入一個完美的音樂空間。音樂播放軟件原理音樂播放器就是音頻解碼器的可視化操作界面,其實質(zhì)是針對各種音頻編碼格式的解碼器。例如ape格式調(diào)用的是Monkey'sAudio解碼器,flac格式調(diào)用的是flac解碼器,mp3調(diào)用的是lame解碼器。大部分音樂播放器都支持多種音樂格式的文件,這是因為這些播放器將不同的音頻解碼器打包起來,并制作統(tǒng)一的播放界面,從而讓使用者能夠方便地播放和聆聽各種音樂。正因為音樂播放器僅僅是將音頻解碼器打包,而同一種音頻的解碼方式又是固定的,因此理論上所有播放器的音質(zhì)應(yīng)當(dāng)是完全相同的,并不存在音質(zhì)最好的音樂播放器。有些音樂播放器會在解碼器的基礎(chǔ)上添加DSP插件,對原始的音樂進行轉(zhuǎn)換和扭曲,以迎合人們的喜好(如加強低音或過濾細節(jié)),美其名曰優(yōu)化音質(zhì)以獲得天籟之音,實質(zhì)卻是破壞原本音樂,雖然能夠使部分音樂更好聽,卻也導(dǎo)致另一些音樂音質(zhì)大打折扣。音樂播放器的人性化界面和擴展性才是各種音樂播放器的特色所在。大部分商業(yè)版播放軟件往往將界面打造得非常華麗,操作也十分簡便,但卻缺乏擴展性,支持格式較少。開源播放軟件一般能夠較好地進行擴展,支持較多的音樂格式,但往往界面樸素,難以吸引用戶。常見的音樂播放軟件PC端foobar2000:功能強大的的播放器,目前公認播放擴展性最好的一款播放器KKBOX(收費):在線音樂播放器,擁有百萬唱片公司授權(quán)音樂點播。千千靜聽:裝機常見播放器,國內(nèi)著名的免費音樂播放軟件??峁罚狠^受歡迎的免費中文播放軟件??嵛遥阂豢钊诟枨蚆V搜索、在線播放、同步歌詞為一體的音樂聚合播放器。QQ音樂:一款帶有精彩音樂推薦功能的播放器。winamp:老牌經(jīng)典的音樂播放軟件,擴展性很強。除此之外還有如下播放器表現(xiàn)比較優(yōu)異AIRPLAY(飛樂):精簡苗條,自稱體積最小的播放器,音質(zhì)較好、壓縮文件無損播放,并且擁有多種視覺效果,是本地播放音樂的選擇之一。BeoPlayer:自稱音質(zhì)很好的播放器,相應(yīng)付出內(nèi)存較多,收費軟件(存在免費版本),界面簡約。JETAUDIO:韓國COWON公司推出的帶有聲音變化效果的集成多媒體播放器,功能較多,界面美觀,操作方便,是多媒體播放器中的奇葩。iTunes:蘋果公司的音樂播放軟件,借助于蘋果龐大的音樂資料庫,其音樂管理功能相當(dāng)出色。亦歌桌面版:需要網(wǎng)絡(luò)狀態(tài)才能夠開啟。界面是Flash界面,和網(wǎng)絡(luò)版亦歌如出一轍。簡約,實用,音樂庫強大。蝦米播放器:蝦米網(wǎng)的播放器,界面簡潔,并加入自創(chuàng)封閉的p2p功能,曲庫采用質(zhì)量和體積較低的192kmp3格式,方便在線聽音樂。YoYoPlayer:java開發(fā)的開源播放器。由于基于Java開發(fā),因此也可以在linux系列操作系統(tǒng)下正常使用。多米(DuoMi):多米音樂無論本地播放還是在線播放都可以,支持下載MV等,但是有時候找不到多米音樂應(yīng)用程序的文件夾,所以在使用多米音樂的時候最好建一個桌面快捷方式。搜狗音樂盒:搜狗網(wǎng)絡(luò)音樂盒,依托搜狗的搜索技術(shù)、自創(chuàng)封閉的p2p下載技術(shù),搜狗音樂盒(桌面版)是一款音樂播放軟件。AIMP3:是一款來自俄羅斯免費的音樂播放軟件,較好的音樂管理系統(tǒng),支持皮膚。手機端手機酷狗酷狗的手機版,常見手機音樂播放器之一。叮咚(原名手機酷狗)是一款免費音樂軟件。漂亮的界面帶來音樂視聽享受,具有卡拉OK歌詞逐字同步播放功能,支持全屏歌手背景頭像。QQ手機音樂播放器QQ音樂播放器的手機版,適合播放流行音樂。這是一款帶有音樂推薦功能的播放器,無聊時聽聽音樂,同時支持在線音樂和本地音樂的播放,是國內(nèi)內(nèi)容較豐富的音樂平臺。音樂搜索和推薦功能可以讓用戶享受流行、美麗的音樂。開心聽將手機智能度提高的手機音樂播放器,針對年輕人設(shè)計的手機音樂播放軟件。開心聽是一款免費的手機音樂播放器,具有較好的音質(zhì)音效,支持隨時播放、搜索、下載歌曲,并且能自動匹配歌詞和專輯圖片,具備智能音樂曲庫,結(jié)合動感相冊,甩歌等功能,讓手機成為類似ipod的工具。天天動聽由用戶需求主導(dǎo)的手機播放器,把用戶思想融入其中,國產(chǎn)手機音樂播放軟件之一。這是一款免費的手機音樂播放軟件,支持歌詞和歌曲圖片下載,皮膚可更換,具備多種可視化效果,同時預(yù)置多種的均衡器效果,支持音效增強,操作簡單,帶來手機聽歌的較好體驗,是拇指一族常用的音樂播放工具。音樂文件格式常見音樂文件格式1、MP3格式MP3的全稱是MovingPictureExpertsGroupAudioLayerIII。是一種音頻壓縮技術(shù),由于這種壓縮方式的全稱叫MPEGAudioLayer3,所以人們把它簡稱為MP3。由于年代久遠,同等碼率下音質(zhì)較差,甚至192k碼率也遠不及96k的AAC格式,正面臨淘汰的命運。2、WMA格式WMA的全稱是WindowsMediaAudio,是微軟力推的一種音頻格式。3、WAV格式WAV格式是微軟公司開發(fā)的一種聲音文件格式,也叫波形聲音文件,是最早的數(shù)字音頻格式,被Windows平臺及其應(yīng)用程序廣泛支持。其它音樂文件格式4、ASF格式ASF的全稱是AdvancedStreamingFormat,是微軟所制訂的一種媒體播放格式,適合在網(wǎng)絡(luò)上播放。5、AAC格式AAC實際上是高級音頻編碼的縮寫。AAC是由FraunhoferIIS-A、杜比和AT&T共同開發(fā)的一種音頻格式,它是MPEG-2規(guī)范的一部分。6、Mp3Pro格式Mp3Pro是Mp3編碼格式的升級版本7、VQF格式VQF格式是由YAMAHA和NTT共同開發(fā)的一種音頻壓縮技術(shù)。8、FLAC格式FLAC即是FreeLosslessAudioCodec的縮寫,中文可解為無損音頻壓縮編碼。9、APE格式APE是早期較流行的數(shù)字音樂文件格式之一。與MP3這類有損壓縮方式不同,APE是一種無損壓縮音頻技術(shù)。10、MID格式MIDI是英語MusicInstrumentDigitalInterface的縮寫,翻譯過來就是“數(shù)字化樂器接口”。11、OGG格式Ogg全稱應(yīng)該是OGGVobis(oggVorbis)是一種新的音頻壓縮格式,類似于MP3等現(xiàn)有的音樂格式。但有一點不同的是,它是完全免費、開放和沒有專利限制的。12、M4A格式M4A是MPEG4音頻標(biāo)準(zhǔn)的文件的擴展名。在MPEG4標(biāo)準(zhǔn)中提到,普通的MPEG4文件擴展名是.mp4。13、eAAC+eaac+格式是新一代應(yīng)用于手機的最優(yōu)化的音樂格式。eaac+的擴展名為M4A。它可以接近CD的音質(zhì),比MP3格式所占存儲空間更小。Android:AProgrammer’sGuideIWhatIsAndroid1.1KeySkills&ConceptsHistoryofembeddeddeviceprogrammingExplanationofOpenHandsetAllianceFirstlookattheAndroidhomescreenItcanbesaidthat,forawhile,traditionaldesktopapplicationdevelopershavebeenspoiled.Thisisnottosaythattraditionaldesktopapplicationdevelopmentiseasierthanotherformsofdevelopment.However,astraditionaldesktopapplicationdevelopers,wehavehadtheabilitytocreatealmostanykindofapplicationwecanimagine.IamincludingmyselfinthisgroupingbecauseIgotmystartindesktopprogramming.Oneaspectthathasmadedesktopprogrammingmoreaccessibleisthatwehavehadtheabilitytointeractwiththedesktopoperatingsystem,andthusinteractwithanyunderlyinghardware,prettyfreely(oratleastwithminimalexceptions).Thiskindoffreedomtoprogramindependently,however,hasneverreallybeenavailabletothesmallgroupofprogrammerswhodaredtoventureintothemurkywatersofcellphonedevelopment.NOTE:Irefertotwodifferentkindsofdevelopersinthisdiscussion:traditionaldesktopapplicationdevelopers,whoworkinalmostanylanguageandwhoseendproduct,applications,arebuilttorunonany"desktop"operatingsystem;andAndroiddevelopers,JavadeveloperswhodevelopfortheAndroidplatform.Thisisnotforthepurposesofsayingoneisbyanymeansbetterorworsethantheother.Rather,thedistinctionismadeforpurposesofcomparingthedevelopmentstylesandtoolsofdesktopoperatingsystemenvironmentstothemobileoperatingsystemenvironment,1.2BriefHistoryofEmbeddedDeviceProgrammingForalongtime,cellphonedeveloperscomprisedasmallsectofaslightlylargergroupofdevelopersknownasembeddeddevicedevelopers.Seenasaless"glamorous"siblingtodesktop—andlaterweb—development,embeddeddevicedevelopmenttypicallygottheproverbialshortendofthestickasfarashardwareandoperatingsystemfeatures,becauseembeddeddevicemanufacturerswerenotoriouslystingyonfeaturesupport.Embeddeddevicemanufacturerstypicallyneededtoguardtheirhardwaresecretsclosely,sotheygaveembeddeddevicedevelopersfewlibrariestocallwhentryingtointeractwithaspecificdevice.Embeddeddevicesdifferfromdesktopsinthatanembeddeddeviceistypicallya"computeronachip."Forexample,consideryourstandardtelevisionremotecontrol;itisnotreallyseenasanoverwhelmingachievementoftechnologicalcomplexity.Whenanybuttonispressed,achipinterpretsthesignalinawaythathasbeenprogrammedintothedevice.Thisallowsthedevicetoknowwhattoexpectfromtheinputdevice(keypad),andhowtorespondtothosecommands(forexample,turnonthetelevision).Thisisasimpleformofembeddeddeviceprogramming.However,believeitornot,simpledevicessuchasthesearedefinitelyrelatedtotherootsofearlycellphonedevicesanddevelopment.Mostembeddeddevicesran(andinsomecasesstillrun)proprietaryoperatingsystems.Thereasonforchoosingtocreateaproprietaryoperatingsystemratherthanuseanyconsumersystemwasreallyaproductofnecessity.Simpledevicesdidnotneedveryrobustandoptimizedoperatingsystems.Asaproductofdeviceevolution,manyofthemorecomplexembeddeddevices,suchasearlyPDAs,householdsecuritysystems,andGPSs,movedtosomewhatstandardizedoperatingsystemplatformsaboutfiveyearsago.Small-footprintoperatingsystemssuchasLinux,orevenanembeddedversionofMicrosoftWindows,havebecomemoreprevalentonmanyembeddeddevices.Aroundthistimeindeviceevolution,cellphonesbranchedfromotherembeddeddevicesontotheirownpath.Thisbranchingisevidentwhenyouexaminetheirarchitecture.Nearlysincetheirinception,cellphoneshavebeenfringedevicesinsofarastheyrunonproprietarysoftware—softwarethatisownedandcontrolledbythemanufacturer,andisalmostalwaysconsideredtobea"closed"system.Thepracticeofmanufacturersusingproprietaryoperatingsystemsbeganmoreoutofnecessitythananyotherreason.Thatis,cellphonemanufacturerstypicallyusedhardwarethatwascompletelydevelopedin-house,oratleasthardwarethatwasspecificallydevelopedforthepurposesofrunningcellphoneequipment.Asaresult,therewerenoopenlyavailable,off-the-shelfsoftwarepackagesorsolutionsthatwouldreliablyinteractwiththeirhardware.Sincethemanufacturersalsowantedtoguardverycloselytheirhardwaretradesecrets,someofwhichcouldberevealedbyallowingaccesstothesoftwarelevelofthedevice,thecommonpracticewas,andinmostcasesstillis,tousecompletelyproprietaryandclosedsoftwaretoruntheirdevices.Thedownsidetothisisthatanyonewhowantedtodevelopapplicationsforcellphonesneededtohaveintimateknowledgeoftheproprietaryenvironmentwithinwhichitwastorun.Thesolutionwastopurchaseexpensivedevelopmenttoolsdirectlyfromthemanufacturer.Thisisolatedmanyofthe"homebrew"developers.NOTE:Agrowingcultureofhomebrewdevelopershasembracedcellphoneapplicationdevelopment.Theterm"homebrew"referstothefactthatthesedeveloperstypicallydonotworkforacellphonedevelopmentcompanyandgenerallyproducesmall,one-offproductsontheirowntime.Another,morecompelling"necessity"thatkeptcellphonedevelopmentoutofthehandsoftheeverydaydeveloperwasthehardwaremanufacturers'solutiontothe"memoryversusneed"dilemma.Untilrecently,cellphonesdidlittlemorethanexecuteandreceivephonecalls,trackyourcontacts,andpossiblysendandreceiveshorttextmessages;notreallythe"Swissarmyknives"oftechnologytheyaretoday.Evenaslateas2002,cellphoneswithcameraswerenotcommonlyfoundinthehandsofconsumers.By1997,smallapplicationssuchascalculatorsandgames(Tetris,forexample)crepttheirwayontocellphones,buttheoverwhelmingfunctionwasstillthatofaphonedialeritself.Cellphoneshadnotyetbecomethemultiuse,multifunctionpersonaltoolstheyaretoday.NooneyetsawtheneedforInternetbrowsing,MP3playing,oranyofthemultitudesoffunctionsweareaccustomedtousingtoday.Itispossiblethatthecellphonemanufacturersof1997didnotfullyperceivetheneedconsumerswouldhaveforanall-in-onedevice.However,eveniftheneedwaspresent,alackofdevicememoryandstoragecapacitywasanevenbiggerobstacletoovercome.Morepeoplemayhavewantedtheirdevicestobeall-in-onetools,butmanufacturersstillhadtoclimbthememoryhurdle.Toputtheproblemsimply,ittakesmemorytostoreandrunapplicationsonanydevice,cellphonesincluded.Cellphones,asadevice,untilrecentlydidnothavetheamountofmemoryavailabletothemthatwouldfacilitatetheinclusionof"extra”programs.Withinthelasttwoyears,thepriceofmemoryhasreachedverylowlevels.Devicemanufacturersnowhavetheabilitytoincludemorememoryatlowerprices.ManycellphonesnowhavemorestandardmemorythantheaveragePChadinthemid-1990s.So,nowthatwehavetheneed,andthememory,wecanalljumpinanddevelopcoolapplicationsforcellphonesaroundtheworld,right?Notexactly.Devicemanufacturersstillcloselyguardtheoperatingsystemsthatrunontheirdevices.WhileafewhaveopeneduptothepointwheretheywillallowsomeJava-basedapplicationstorunwithinasmallenvironmentonthephone,manydonotallowthis.EventhesystemsthatdoallowsomeJavaappstorundonotallowthekindofaccesstothe"core”systemthatstandarddesktopdevelopersareaccustomedtohaving.1.3OpenHandsetAllianceandAndroidThisbarriertoapplicationdevelopmentbegantocrumbleinNovemberof2007whenGoogle,undertheOpenHandsetAlliance,releasedAndroid.TheOpenHandsetAllianceisagroupofhardwareandsoftwaredevelopers,includingGoogle,NTTDoCoMo,SprintNextel,andHTC,whosegoalistocreateamoreopencellphoneenvironment.Thefirstproducttobereleasedundertheallianceisthemobiledeviceoperatingsystem,Android.(FormoreinformationabouttheOpenHandsetAlliance,see.)WiththereleaseofAndroid,Googlemadeavailableahostofdevelopmenttoolsandtutorialstoaidwould-bedevelopersontothenewsystem.Helpfiles,theplatformsoftwaredevelopmentkit(SDK),andevenadevelopers'communitycanbefoundatGoogle’sAndroidwebsite,/android.Thissiteshouldbeyourstartingpoint,andIhighlyencourageyoutovisitthesite.NOTE:Google,inpromotingthenewAndroidoperatingsystem,evenwentasfarastocreatea$10millioncontestlookingfornewandexcitingAndroidapplications.WhilecellphonesrunningLinux,Windows,andevenPalmOSareeasytofind,asofthiswriting,nohardwareplatformshavebeenannouncedforAndroidtorunon.HTC,LGElectronics,Motorola,andSamsungaremembersoftheOpenHandsetAlliance,underwhichAndroidhasbeenreleased,sowecanonlyhopethattheyhaveplansforafewAndroid-baseddevicesinthenearfuture.WithitsreleaseinNovember2007,thesystemitselfisstillinasoftware-onlybeta.Thisisgoodnewsfordevelopersbecauseitgivesusarareadvancelookatafuturesystemandachancetobegindevelopingapplicationsthatwillrunassoonasthehardwareisreleased.NOTE:ThisstrategyclearlygivestheOpenHandsetAllianceabigadvantageoverothercellphoneoperatingsystemdevelopers,becausetherecouldbeanuncountablenumberofapplicationsavailableimmediatelyforthefirstdevicesreleasedtorunAndroid.IntroductiontoAndroidAndroid,asasystem,isaJava-basedoperatingsystemthatrunsontheLinux2.6kernel.Thesystemisverylightweightandfullfeatured.AndroidapplicationsaredevelopedusingJavaandcanbeportedrathereasilytothenewplatform.IfyouhavenotyetdownloadedJavaorareunsureaboutwhichversionyouneed,IdetailtheinstallationofthedevelopmentenvironmentinChapter2.OtherfeaturesofAndroidincludeanaccelerated3-Dgraphicsengine(basedonhardwaresupport),databasesupportpoweredbySQLite,andanintegratedwebbrowser.IfyouarefamiliarwithJavaprogrammingorareanOOPdeveloperofanysort,youarelikelyusedtoprogrammaticuserinterface(UI)development—thatis,UIplacementwhichishandleddirectlywithintheprogramcode.Android,whilerecognizingandallowingforprogrammaticUIdevelopment,alsosupportsthenewer,XML-basedUIlayout.XMLUIlayoutisafairlynewconcepttotheaveragedesktopdeveloper.IwillcoverboththeXMLUIlayoutandtheprogrammaticUIdevelopmentinthesupportingchaptersofthisbook.OneofthemoreexcitingandcompellingfeaturesofAndroidisthat,becauseofitsarchitecture,third-partyapplications—includingthosethatare“homegrown”—areexecutedwiththesamesystempriorityasthosethatarebundledwiththecoresystem.Thisisamajordeparturefrommostsystems,whichgiveembeddedsystemappsagreaterexecutionprioritythanthethreadpriorityavailabletoappscreatedbythird-partydevelopers.Also,eachapplicationisexecutedwithinitsownthreadusingaverylightweightvirtualmachine.AsidefromtheverygenerousSDKandthewell-formedlibrariesthatareavailabletoustodevelopwith,themostexcitingfeatureforAndroiddevelopersisthatwenowhaveaccesstoanythingtheoperatingsystemhasaccessto.Inotherwords,ifyouwanttocreateanapplicationthatdialsthephone,youhaveaccesstothephone’sdialer;ifyouwanttocreateanapplicationthatutilizesthephone’sinternalGPS(ifequipped),youhaveaccesstoit.Thepotentialfordeveloperstocreatedynamicandintriguingapplicationsisnowwideopen.OntopofallthefeaturesthatareavailablefromtheAndroidsideoftheequation,Googlehasthrowninsomeverytantalizingfeaturesofitsown.DevelopersofAndroidapplicationswillbeabletotietheirapplicationsintoexistingGoogleofferingssuchasGoogleMapsandtheomnipresentGoogleSearch.SupposeyouwanttowriteanapplicationthatpullsupaGooglemapofwhereanincomingcallisemanatingfrom,oryouwanttobeabletostorecommonsearchresultswithyourcontacts;thedoorsofpossibilityhavebeenflungwideopenwithAndroid.Chapter2beginsyourjourneytoAndroiddevelopment.Youwilllearnthehow’sandwhy’sofusingspecificdevelopmentenvironmentsorintegrateddevelopmentenvironments(IDE),andyouwilldownloadandinstalltheJavaIDEEclipse.2Application:HelloWorld2.1KeySkills&ConceptsCreatingnewAndroidprojectsWorkingwithViewsUsingaTextViewModifyingthemain.xmlfileRunningapplicationsontheAndroidEmulatorInthischapter,youwillbecreatingyourfirstAndroidActivity.Thischapterexaminestheapplication-buildingprocessfromstarttofinish.IwillshowyouhowtocreateanAndroidprojectinEclipse,addcodetotheinitialfiles,andrunthefinishedapplicationintheAndroidEmulator.TheresultingapplicationwillbeafullyfunctioningprogramrunninginanAndroidenvironment.Actually,asyoumovethroughthischapter,youwillbecreatingmorethanoneAndroidActivity.ComputerprogrammingtraditiondictatesthatyourfirstapplicationbethetypicalHelloWorld!application,sointhefirstsectionyouwillcreateastandardHelloWorld!applicationwithjustablankbackgroundandthe“HelloWorld!”text.Then,forthesakeofenablingyoutogettoknowthelanguagebetter,thenextsectionexplainsindetailthefilesautomaticallycreatedbyAndroidforyourHelloWorld!application.YouwillcreatetwoiterationsofthisActivity,eachusingdifferenttechniquesfordisplayinginformationtothescreen.YouwillalsocreatetwodifferentversionsofaHelloWorld!applicationthatwilldisplayanimagethatdeliversthe“HelloWorld!”message.ThiswillgiveyouagoodintroductiontothecontrolsandinnerworkingsofAndroid.NOTE:Youwilloftensee“application”and"Activity”usedinterchangeably.ThedifferencebetweenthetwoisthatanapplicationcanbecomposedofmultipleActivities,butoneapplicationmusthaveatleastoneActivity.Each“window”orscreenofyourapplicationisaseparateActivity.Therefore,ifyoucreateafairlysimpleapplicationwithonlyonescreenofdata(liketheHelloWorld!applicationinthischapter),thatwillbeoneActivity.InfuturechaptersyouwillcreateapplicationswithmultipleActivities.TomakesurethatyougetagoodoveralllookatprogramminginAndroid,inChapter6youwillcreatebothoftheseapplicationsintheAndroidSDKcommand-lineenvironmentforMicrosoftWindowsandLinux.Inotherwords,thischaptercoversthecreationprocessinEclipse,andChapter6coversthecreationprocessusingthecommand-linetools.Therefore,beforecontinuing,youshouldcheckthatyourEclipseenvironmentiscorrectlyconfigured.ReviewthestepsinChapter3forsettingthePATHstatementfortheAndroidSDK.YoushouldalsoensurethattheJREiscorrectlyinyourPATHstatement.TIP:Ifyouhaveconfiguration-relatedissueswhileattemptingtoworkwithanyofthecommand-lineexamples,tryreferringtotheconfigurationstepsinChapters2and3;andlookattheAndroidSDKdocumentation.2.2CreatingYourFirstAndroidProjectinEclipseTostartyourfirstAndroidproject,openEclipse.WhenyouopenEclipseforthefirsttime,itopenstoanemptydevelopmentenvironment(seeFigure5-1),whichiswhereyouwanttobegin.Yourfirsttaskistosetupandnametheworkspaceforyourapplication.ChooseFile|New|AndroidProject,whichwilllaunchtheNewAndroidProjectwizard.CAUTIONDonotselectJavaProjectfromtheNewmenu.WhileAndroidapplicationsarewritteninJava,andyouaredoingallofyourdevelopmentinJavaprojects,thisoptionwillcreateastandardJavaapplication.SelectingAndroidProjectenablesyoutocreateAndroid-specificapplications.IfyoudonotseetheoptionforAndroidProject,thisindicatesthattheAndroidpluginforEclipsewasnotfullyorcorrectlyinstalled.ReviewtheprocedureinChapter3forinstallingtheAndroidpluginforEclipsetocorrectthis.2.3TheNewAndroidProjectwizardcreatestwothingsforyouAshellapplicationthattiesintotheAndroidSDK,usingtheandroid.jarfile,andtiestheprojectintotheAndroidEmulator.ThisallowsyoutocodeusingalloftheAndroidlibrariesandpackages,andalsoletsyoudebugyourapplicationsintheproperenvironment.Yourfirstshellfilesforthenewproject.Theseshellfilescontainsomeofthevitalapplicationblocksuponwhichyouwillbebuildingyourprograms.InmuchthesamewayascreatingaMicrosoft.NETapplicationinVisualStudiogeneratessomeWindows-createdprogramcodeinyourfiles,usingtheAndroidProjectwizardinEclipsegeneratesyourinitialprogramfilesandsomeAndroid-createdcode.Inaddition,theNewAndroidProjectwizardcontainsafewoptions,shownnext,thatyoumustsettoinitiateyourAndroidproject.FortheProjectNamefield,forpurposesofthisexample,usethetitleHelloWorldText.ThisnamesufficientlydistinguishesthisHelloWorld!projectfromtheothersthatyouwillbecreatinginthischapter.IntheContentsarea,keepthedefaultselections:theCreateNewProjectinWorkspaceradiobuttonshouldbeselectedandtheUseDefaultLocationcheckboxshouldbechecked.ThiswillallowEclipsetocreateyourprojectinyourdefaultworkspacedirectory.Theadvantageofkeepingthedefaultoptionsisthatyourprojectsarekeptinacentrallocation,whichmakesordering,managing,andfindingtheseprojectsquiteeasy.Forexample,ifyouareworkinginaUnix-basedenvironment,thispathpointstoyour$HOMEdirectory.IfyouareworkinginaMicrosoftWindowsenvironment,theworkspacepathwillbeC:/Users/<username>/workspace,asshowninthepreviousillustration.However,foranynumberofreasons,youmaywanttounchecktheUseDefaultLocationcheckboxandselectadifferentlocationforyourproject.OnereasonyoumaywanttospecifyadifferentlocationhereissimplyifyouwanttochoosealocationforthisspecificprojectthatisseparatefromotherAndroidprojects.Forexample,youmaywanttokeeptheprojectsthatyoucreateinthisbookinadifferentlocationfromprojectsthatyoucreateinthefutureonyourown.Ifso,simplyoverridetheLocationoptiontospecifyyourowncustomlocationdirectoryforthisproject.Android:一個程序員的入門書1什么是Android1.1主要技巧和思想.歷史的嵌入式器件編程.開放手機聯(lián)盟的解釋.第一眼看到Android的主屏幕可以這么說,暫時,傳統(tǒng)的桌面應(yīng)用程序開發(fā)者已經(jīng)被慣壞了。這個不是說桌面應(yīng)用程序開發(fā)比其他形式的開發(fā)很簡單??傊?,作為傳統(tǒng)的桌面應(yīng)用程序開發(fā)者,我們必須有能力創(chuàng)造出各種應(yīng)用程序凡是我們能想象到的。包括我自己,因為我也是從做桌面程序開始的。一方面已經(jīng)使得桌面程序更容易理解就是我們已經(jīng)有能力去跟桌面操作系統(tǒng)相互作用,因此,任何底部的硬件很自由的相互作用。這種類型獨立自主的程序編制,然而,對于很小的開發(fā)者團體來說是不敢冒險的去搞手機發(fā)展這樣渾濁的技術(shù)的。注解:我提到兩種不同的開發(fā)商在此討論:傳統(tǒng)的桌面應(yīng)用程序開發(fā),他們能在任何語言環(huán)境下工作,而且最終的產(chǎn)品和程序是用來運行“桌面”操作系統(tǒng)的;還有Android程序開發(fā)者,那些開發(fā)Android平臺開發(fā)工具的JAVA程序開發(fā)人員。這不是說跟其他人比起來誰好誰壞。其實,區(qū)別目的僅僅在于想說明并比較Android桌面操作系統(tǒng)環(huán)境的開發(fā)風(fēng)格,工具。1.2嵌入式器件編程的簡要歷史有很長一段時間,手機的開發(fā)者由大的著名嵌入式的開發(fā)團隊中的少數(shù)人組成,作為嵌入式設(shè)備的開發(fā)者。相對于桌面開發(fā)或者后續(xù)的網(wǎng)絡(luò)開發(fā),被視作更少“魅力”,而且嵌入式設(shè)備的開發(fā)通常因為硬件和操作系統(tǒng)而處于劣勢。因為嵌入式設(shè)備的制造商們太小氣,他們要保護他們硬件方面的秘密,所以他們給開發(fā)者們非常有限的庫去運行當(dāng)他們嘗試去讓一些特定的設(shè)備去相互作用。嵌入設(shè)備與桌面系統(tǒng)顯著不同的一部分是嵌入設(shè)備是個有特色的“芯片上的電腦”。例如:考慮你的標(biāo)準(zhǔn)電話遙控。這個并不是一個非常強大并且復(fù)雜性的技術(shù)。當(dāng)任何的按鈕被按下去,一個芯片解釋一個信號以一種方式已經(jīng)被編程進了這個設(shè)備。這個允許設(shè)備知道什么是從輸入設(shè)備(鍵盤)來的需要。并且如何的響應(yīng)這些命令(比如,打開電視機)。這個是一個簡單的嵌入式設(shè)備的編程??傊?,不管你相不相信,像這樣的簡單設(shè)備絕對的和早期的手機設(shè)備開發(fā)的根源有著緊密的聯(lián)系。大多數(shù)的嵌入式設(shè)備運行(有些仍然還在運行)在私有的操作系統(tǒng)。原因是選擇創(chuàng)建一個私有的操作系統(tǒng)而不是用任何消費系統(tǒng)是產(chǎn)品的需要。簡單的設(shè)備不需要非常健全和優(yōu)化的操作系統(tǒng)。作為一個產(chǎn)品的演化,更多復(fù)雜的嵌入式設(shè)備,如早期的PDA,家庭安全系統(tǒng)和GPS等。5年前某種程度上都轉(zhuǎn)移標(biāo)準(zhǔn)的操作系統(tǒng)平臺上。小的操作系統(tǒng)如Linux,甚至一個微軟版本的嵌入式平臺,已經(jīng)在嵌入設(shè)備上變得普遍了。設(shè)備改革的這段時間里,手機從其他嵌入式設(shè)備中分支出去。走上了自己的軌道,這個分支是顯而易見的當(dāng)你去調(diào)查他們的體系結(jié)構(gòu)。在他們最初開始的時候,手機作為一個外圍設(shè)備并且運行私有軟件,而這些軟件被制造商們所擁有和控制,而且?guī)缀蹩梢员徽J為是一個“關(guān)閉”的系統(tǒng)。習(xí)慣使用私有操作系統(tǒng)主要是制造商自己開發(fā)硬件,或者至少定義了開發(fā)的目的只是用來運行手機。最終的結(jié)果就是使開放成為不可能?,F(xiàn)有的軟件包或者解決方案會可靠的和他們的硬件交互。而且,制造商想要保護他們硬件的商業(yè)秘密。以防允許進入而發(fā)現(xiàn)設(shè)備軟件的水準(zhǔn)。所以風(fēng)尚就是,而且大多數(shù)仍然是使用完全私有并且關(guān)閉的軟件來運行他們的設(shè)備。任何人想為手機開發(fā)程序必須需要詳盡的私有環(huán)境來運行軟件的知識。而解決方案就是直接從制造商那里購買昂貴的開發(fā)工具。這就孤立了很多的“自制軟件”的開發(fā)者。注解:一個關(guān)于自制軟件開發(fā)的文化包含了手機程序的開發(fā)?!白灾栖浖笔侵搁_發(fā)者通常不是工作在手機開發(fā)公司內(nèi),通常利用自己的時間在他們的設(shè)備上生產(chǎn)小的,一次性的產(chǎn)品。另外,使手機開發(fā)無法出手的是硬件制造商對于“內(nèi)存和需要”左右為難的解決方案。直到最近,手機才能執(zhí)行比打出和接聽電話,查找聯(lián)系人,發(fā)送和接收短消息。不是今天“瑞士軍刀”的技術(shù)。及時在2

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論