【正文】
backstage manager of inquiry。 pletion point, the puter management menu, point the menu and the kitchen, frontend checkout synchronization print。). It includes operating systems, user interface and applications mobile phone work required by the software, but there is no past, the exclusive right to impede innovation and barriers to mobile industry, called mobile terminal is the first to create a truly open and plete mobile software. Google and Open Handset Alliance to develop the Android, the alliance by including China Mobile, Motorola, Qualm and TMobile, including more than 30 technology and the position of a leader in wireless applications. Google with operators, equipment manufacturers, developers and other interested parties to form deeplevel partnerships, hoping to establish a standardized, open software platform for mobile phones in the mobile industry to form an open ecosystem . It uses software stack layers (software stack, also known as the software stack) architecture, is divided into three parts: the core of the underlying Linuxbased language developed by the c, only basic functions. Middle layer consists of library. Library and Virtual Machine Virtual Machine, developed by the C +. At the top are a variety of applications, including the call procedures, SMS procedures, application software is developed by the panies themselves to write java.To promote this technology, Google, and dozens of other phone pany has established the Open Handset Alliance (Open Handset Alliance).Characteristic?application framework to support ponent reuse and replacement? Dalvik virtual machine specifically for mobile devices is optimized? Internal integrated browser, the browserbased opensource WebKit engine ? optimization of 2D and 3D graphics library includes graphics library, 3D graphics library based on OpenGL ES (hardwareaccelerated optional)? SQLite for structured data storage ? Multimedia support includes the mon audio, video and static image file formats (such as MPEG4, , MP3, AAC, AMR, JPG, PNG, GIF) ? GSM phone (depending on hardware) ? Bluetooth Bluetooth, EDGE, 3G, and WiFi (hardware dependent) ? Camera, GPS, pass, and accelerometer (hardware dependent) ? Rich development environment including a device emulator, debugger, memory and performance analysis charts, and the Eclipse integrated development environment pluginsApplicationsA core Android application package together with the release of the application package, including client, SMS short messaging program, calendar, maps, browser, contact management procedures. A ll applications are written using JAVA.Android Application Framework Developers have full access to core applications used by the API framework. The application framework designed to simplify the reuse of software ponents。程序的編寫、調(diào)試以及最后的系統(tǒng)測試都是在他們熱心的幫助下完成的。感謝我的父母親,你們是我力量的源泉,只要有你們,不管面對什么樣的困難,我都不會害怕。穆老師在我畢業(yè)設(shè)計的整體規(guī)劃與實(shí)現(xiàn),畢業(yè)論文的撰寫過程中,給我提供了極大的幫助和指導(dǎo)。致 謝這次畢業(yè)論文能夠得以順利完成,是所有曾經(jīng)指導(dǎo)過我的老師,幫助過我的同學(xué),一直支持著我的家人對我的教誨、幫助和鼓勵的結(jié)果。經(jīng)測試可得出如下結(jié)論:1. 能實(shí)現(xiàn)客戶端與服務(wù)器端良好的連接,使用戶正常登錄;2. 用戶登錄后,客戶端之間基本的文字聊天、表情發(fā)送、圖片及語音功能正常實(shí)現(xiàn);3. 用戶登錄后,實(shí)現(xiàn)好友列表與聊天記錄的顯示;4. 用戶登錄后,能實(shí)現(xiàn)查找好友并對用戶個人信息進(jìn)行更新,退出系統(tǒng)等??蛻舳说脑O(shè)計釆用了模塊化的設(shè)計,使其具有較好的可移植性和可擴(kuò)展性??蛻舳酥饕ㄒ韵聨讉€主要功能:用戶的注冊、用戶的登錄、即時通信的文字通信、圖片傳輸以及語音錄制、播放和發(fā)送的設(shè)計等?!??!保碋nter,: 數(shù)據(jù)庫中用戶信息輸入“select * from friend?!?,再按Enter接著輸入“show tables。建立好友表CREATE TABLE IF NOT EXISTS ( `selfId` int(11) NOT NULL, `friendId` int(11) NOT NULL, PRIMARY KEY (`selfId`,`friendId`), KEY `friendId` (`friendId`), CONSTRAINT `friendId` FOREIGN KEY (`friendId`) REFERENCES `user` (`userId`) ON DELETE CASCADE, CONSTRAINT `selfId` FOREIGN KEY (`selfId`) REFERENCES `user` (`userId`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=gbk。建立聊天信息表CREATE TABLE ( `sendId` int(10) NOT NULL, `receiveId` int(10) NOT NULL, `type` int(11) NOT NULL, `time` varchar(20) NOT NULL, `content` varchar(100) NOT NULL, PRIMARY KEY (`sendId`,`receiveId`,`time`), KEY `receiveId` (`receiveId`), CONSTRAINT `receiveId` FOREIGN KEY (`receiveId`) REFERENCES `user` (`userId`) ON DELETE CASCADE, CONSTRAINT `sendId` FOREIGN KEY (`sendId`) REFERENCES `user` (`userId`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=gbk。 數(shù)據(jù)庫的建立數(shù)據(jù)庫的設(shè)計如下所示:建立數(shù)據(jù)庫diskCREATE DATABASE IF NOT EXISTS woliao DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci。 刪除聊天記錄“刪除全部聊天記錄”框,單擊以后將刪除你與該用戶的所有聊天信息。如下圖一一所示具體功能: 文本聊天與表情的選擇 語音信息的輸入 圖片的發(fā)送“笑臉”按鈕所出現(xiàn)的表情選擇框;;。中間部分是聊天信息顯示窗口,在“輸入消息”欄中輸入所需的文本消息,點(diǎn)擊“發(fā)送”按鈕,就可以實(shí)現(xiàn)文本聊天。 } return (item)。 startActivity(i)。 break。 } Override public boolean onOptionsItemSelected(MenuItem item) { switch(()){ case 0: //跳轉(zhuǎn)到“查找好友界面” Intent intent=new Intent(this, )。 (0, 1, 0, 設(shè)置)。 找朋友與設(shè)置模塊測試進(jìn)入到主界面,即好友列表及聊天記錄界面,單擊Menu按鈕,: 好友列表及聊天記錄界面點(diǎn)擊“找朋友”按鈕,將會進(jìn)入到找朋友界面,: 找朋友界面在空白框內(nèi)正確輸入要查找的我聊號,: 搜索我聊用戶點(diǎn)擊“設(shè)置”按鈕,: 設(shè)置界面點(diǎn)擊“編輯”按鈕,可以從相冊中選擇圖片,重新編輯用戶的個人頭像,: 更新用戶頭像信息點(diǎn)擊“退出登錄”按鈕,則直接退出登錄。 } })。 return。實(shí)現(xiàn)代碼如下: (new () { Override public void onClick(View v) { //判斷nickNameEdit是否有值,沒有則不能編輯頭像 String self=().toString().trim()。 break。 } (userId, pwd)。 //檢查合法性 if(() || ()){ makeTextShort(用戶ID或密碼不能為空)。 } } }},: 日志信息顯示 客戶端測試 登陸模塊測試: 登陸界面在EditText欄中正確輸入我聊號與密碼就能實(shí)現(xiàn)登陸,進(jìn)入主頁面。 } catch (IOException e) { ()。 }catch (IOException e) { ()。 ()。 (time)。 SimpleDateFormat sdf=new SimpleDateFormat(yyyyMMdd hh:mm:ss )。 } } DataOutputStream dos=null。 if(()==false){ try { ()。對程序添加日志功能后,可以對程序出現(xiàn)的問題進(jìn)行記錄并快速地找到出現(xiàn)異常的原因和代碼行,充當(dāng)程序的調(diào)試器。其中tag是一個標(biāo)識,可以是任意字符串,通??梢允褂妙惷?方法名,主要是用來在查看日志時提供一個篩選條件;msg是日志的具體信息。在小型Java應(yīng)用程序中,通常