【正文】
③點擊Browse…,選擇加入Android SDK的目錄。圖42 更新eclipse并下載ADT 使用Ec1ipse開發(fā)Android應(yīng)用使用Eclipse IDE開發(fā)一個Android應(yīng)用。然后可以編輯代碼,啟動,調(diào)試應(yīng)用。ADT插件提供了一個新的工程向?qū)椭焖俚慕ndroid工程和編輯現(xiàn)存的Android項目的代碼。②選擇AndroidAndroid project,點擊Next。選擇create project from existing Application(在AndroidSDK的目錄中可以找到)。ADT插件將會為工程建立src/代碼文件存放的目錄、res/。填寫虛擬機的sd卡內(nèi)存(如設(shè)置size為256MB),然后點擊Create AVD。圖43 創(chuàng)建android虛擬機(3)調(diào)試應(yīng)用程序。如果需要還可以重新配置啟動參數(shù),比如選擇其他的程序界面作為啟動的主界面。Android Developer Tools 自動創(chuàng)建這個文件,它提供訪問 Android 應(yīng)用程序的各種資源所需的常量。示例應(yīng)用程序的部署描述符。資源分為三類::這個文件夾包含圖形文件,比如圖標(biāo)和位圖。后面會詳細(xì)研究這些文件。這是為應(yīng)用程序?qū)崿F(xiàn)字符串本地化的主要方法。也可以認(rèn)為這就是 “拉伸”。在構(gòu)建期間對所有資源進行編譯。 manifest xmlns:android=package=android:versionCode=1android:versionName= usessdk android:minSdkVersion=8 /! 閱讀消息usespermission android:name=/! 接收消息 usespermission android:name= /application android:icon=drawable/ic_launcher android:label=string/app_name activity android:label=string/app_name android:name=.SmsListActivity intentfilter action android:name= /category android:name= //intentfilter/activityactivity android:label=string/app_name android:name=.SearchActivity /activityactivity android:label=string/app_name android:name=.SearchSmsListActivity /activity/application/manifest 圖45 短信界面 Android 應(yīng)用程序的部署描述符。 手機短信軟件設(shè)計實現(xiàn) 系統(tǒng)主界面的實現(xiàn)本軟件開始執(zhí)行后,便直接進入了系統(tǒng)的主界面,為了系統(tǒng)以后能擴展其他服務(wù),故將主界面設(shè)置成一般界面,如圖46所示。在這個布局里需要添加Button和四個TextViews的布局。(2)在程序一開始時,框架就反向調(diào)用oncreate方法,也調(diào)用oncreateoptionsMenu()。繼續(xù)執(zhí)行到setcontentview()指令時,依據(jù)它來進行屏幕畫面的布局,并顯示出來。(0, MENU_ORDER_BY_DATE, 0, 按日期排序) 。 (0, MENU_SEARCH, 0, 短信搜索) 。 return true。 new LoadTask().execute()。 case MENU_ORDER_BY_NAME : orderBy = person desc 。 return true。 startActivity( i3 )。 case MENU_REFRESH: { new LoadTask().execute()。 } } return (item)。實現(xiàn)代碼: btnSend = (Button)()。 (search_key, ().toString().trim() ) 。 finish()。程序中的背景圖片都放在res文件夾中的drawable文件夾中,其中有低,中,高三種分辨率,本設(shè)計中我們采用低的分辨率。最后, name,lable進行注冊。第5章 短信息的備份與恢復(fù)第6章 結(jié)語 總結(jié)本文主要研究了Android平臺的架構(gòu)以及在Android平臺上開發(fā)短信管理系統(tǒng)。然后對系統(tǒng)開發(fā)平臺Android進行了詳細(xì)的分析,介紹了Android的特征、Android的架構(gòu)以及Android應(yīng)用的構(gòu)成和工作機制,對軟件的運行設(shè)計流程進行了詳細(xì)的分析,對Android客戶端的實現(xiàn)進行描述,最后是結(jié)論部分,總結(jié)了本文的主要研究內(nèi)容和研究成果,分析了存在的問題,并對今后的發(fā)展方向進行了展望。(2)本文所開發(fā)的系統(tǒng)目前還只是在模擬器上進行運行,還有待移植到真機上進行進一步研究。參考文獻[1]李觀華,2003[2]廖永剛,余冬梅,2006[3]張培仁,《基于C語言編程MCS51單片機原理與應(yīng)用》,電子工業(yè)出版社,2003[4]Ed Burnette. Hello,Android:Introducing Google’s Mobile Development Bookshelf,2008[5]閻石編,《數(shù)字電子技術(shù)基礎(chǔ)》,孫凱Android SDK Application framework Dalvik virtual machine Integrated browserWebKit Optimized graphics 3D graphics based on the OpenGL ES specification (hardware acceleration optional)for structured data storagefor mon audio, video, and still image formats (MPEG4, , MP3, AAC, AMR, JPG, PNG, GIF)(hardware dependent)(hardware dependent)(hardware dependent)including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDEApplicationsAndroid will ship with a set of core applications including an client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language.Application FrameworkBy providing an open development platform, Android offers developers the ability to build extremely rich and innovative applications. Developers are free to take advantage of the device hardware, access location information, run background services, set alarms, add notifications to the status bar, and much, much more.Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of ponents。 A rich and extensible set ofthat can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browserthat enable applications to access data from other applications (such as Contacts), or to share their own dataResource Manager, providing access to noncode resources such as localized strings, graphics, and layout filesNotification Manager Anthat manages the lifecycle of applications and provides a mon navigation backstackFor more details and a walkthrough of an application, see the System C library Media Librariess OpenCORE。 Surface Manager LibWebCore SGL 3D libraries the libraries use either hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer bitmap and vector font rendering a powerful and lightweight relational database engine available to all applicationsAndroid RuntimeAndroid includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is registerbased, and runs classes piled by a Java language piler that have been transformed into the .dex format by the included dx tool.The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and lowlevel memory management.Linux KernelAndroid relies on Linux version for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.android 開發(fā)幫助賈斯廷Beta版的Android SDK 提供了在Android平臺上使用JAVA語言進行Android應(yīng)用開發(fā)必須的工具和API接口。 應(yīng)用程序框架支持組件的重用與替換 集成的瀏覽器基于開源的webkit 引擎 SQLite 用作結(jié)構(gòu)化的數(shù)據(jù)存儲 GSM 電話技術(shù)(依賴于硬件) 照相機,GPS,指南針,和加速度計(accelerometer) (依賴于硬件)