基于安卓android平台即时通信系统的设计与实现毕业论文_第1页
基于安卓android平台即时通信系统的设计与实现毕业论文_第2页
基于安卓android平台即时通信系统的设计与实现毕业论文_第3页
基于安卓android平台即时通信系统的设计与实现毕业论文_第4页
基于安卓android平台即时通信系统的设计与实现毕业论文_第5页
已阅读5页,还剩40页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

哈尔滨理工大学毕业设计(论文)任务书学生姓名:尹文博 学号:0705030302学 院:测控技术与通信工程学院 专业:通信工程任务起止时间:2011年3月7日 至 2011年6月24日毕业设计(论文)题目:基于ANDROID平台即时通信系统的设计与实现毕业设计工作内容:3月7日3月20日:搜集与课题有关的资料,了解ANDROID平台的相关应用与背景资料;3月21日4月15日:了解ANDROID平台架构组成及个组成部分作用,尝试搭建ANDROID开发环境并测试简单应用程序;4月16日5月31日:学习并掌握ANDROID平台的手机即时通讯系统的架构和客户端,服务器端解决方案;6月1日6月24日:完成服务器端,客户端的设计与实现。完成系统部署及测试并撰写毕业论文,准备答辩。资料:1 王向辉 张国印 沈洁.ANDROID应用程序开发.清华大学出版社,2010.32 于少山 卡米利 毛依丁 基于XML的即时通讯系统的研究与实现重庆邮电大学学报 2007年6月59-613Jason Morris.Android User Interface Development.Packt Publishing Ltd20114 J.F.Dimarzio Android A Progranmmers Guide Mc Graw Hill.2008指导教师意见:签名:年 月 日系主任意见:签名:年 月 日教务处制表哈尔滨理工大学毕业设计 中期总结学生姓名:尹文博 学号:0705030302学 院:测控技术与通信工程学院 专业:通信工程任务起止时间:2011年3月7日 至 2011年6月24日毕业设计(论文)题目:基于STM32F103的高精度锁相环研究与实现中期总结:一、课题来源及研究的目的和意义:随着3G网络的应用,移动终端不再仅是通讯网络终端,还将成为互联网的终端。移动终端的应用软件和需求的服务与日俱增。GOOGLE与2007年11月推出了一个专为移动设备设计的软件平台ANDROID。ANDROID是一套真正意义上的开放性的移动设备综合平台,它包括操作系统,中间软件和一些关键的平台应用。ANDROID是由Linux+Java构成的开源软件,允许所有厂商和个人在其基础上进行开发。ANDROID平台的开放性等特点既能促进技术(包括平台本身)的创新,又有助于降低开发成本,还可以使运营商能非常方便的定制自己特色化的产品。因此,它具有很大的市场潜力。我国网民数量于2008年底首次超越美国跃居世界第一位,其中手机网民达到8千多万,手机上网成为网络接入的一个重要发展方向。即时通信使用率更是高达百分之八十。说明即时通信在网络应用中占据了十分重要的位置。二、国内外在该方向的研究现状及分析:Linux系统是一个源代码开放的操作系统。由于其开源性,手机制造商可以根据实际情况开发自己的Linux手机操作系统,从而吸引更多的软件制造商在其上开发更多的应用软件,丰富第三方的应用。但是Linux操作系统也存在不足,集成开发环境和基于Linux的产品与PC的链接性比较差等.MSN是微软公司开发的即时通讯工具,与Windows实现无缝结合,在国内即时通讯软件中仅次于QQ占据第二的位置.popo是网易公司开发的一款免费多媒体即时通讯工具,融合了QQ与MSN的优点,解决安全与隐私问题的功能非常完善.popo还支持用户同时登陆一个MSN账户,实现与MSN的互通互联.ICQ是1996年11月在全世界范围推出的第一款即时通讯软件,是现在功能最强大全球用户最多应用最广泛的即时通讯工具.目前主流的IM协议主要有即时信息和空间协议(IMPP),空间和即时信息协议(PRIM),针对即时通讯和空间平衡扩充的进程开始协议SIP(SIMPLE)和XMPP(EXTENSIBLE MESAGEING AND PRESENCE PROTOCOL)协议。三、主要研究内容学习和进展情况的说明:1.ANDROID的架构分析ANDROID的架构是由Linux内核,C/C+函数库,dalvik虚拟机,应用框架以及应用程序构成的.通过编译基于框架的应用程序可以降低开发负荷.应用软件原则上是在dalvik vm上运行的.ANDROID应用程序的开发基于框架和组件。ANDROID本身已在其框架中提高了许多的组件供应用程序调用,开发者也可开放新组件于应用程序框架中。ANDROID应用程序框架之下是一套C/C+函数库,它们服务于ANDROID应用程序组件,其功能通过组件间接提供给开发者。ANDROID的Java程序运行环境包含一组Java核心函数库及dalvik虚拟机,他们有效地优化了Java程序的运行环境。所有的ANDROID应用都运行在它自己的进程里。2. ANDROID应用构成和工作机制 一个ANDROID程序一般是由ACTIVITY,INTENT RECEIVER,SERVICE,CONTENT PROVIDER四部分组成。在应用程序中使用时需要在配置文件ANDROIDMAINFEST.XML中进行配置。这个配置文件是每个ANDROID应用程序所必需的,用于定义应用程序的组件,组件的功能以及必要条件等。3. 即时通讯系统架构 客户端:基于ANDROID平台进行开发。通过GPRS无线网络与INTERNET网络建立连接,通过服务器实现与ANDROID客户端或PC机客户端之间的即时通讯。客户端负责初始化通讯过程以及向服务器发起建立连接请求。 服务器端:采用开源OPENFIRE作为服务器。允许多个客户端同时登录并发的连接到一个服务器上。服务器对每个客户端的连接进行认证,对通过客户端创建会话。4. 系统即时通讯协议 XMPP没有结合特定的网络,是一种客户/服务器架构,客户端与服务器之间采用的是TCP连接,服务器与服务器之间采用的也是TCP连接。 一个实体在XMPP网络结构中被认为是一个接点,它有唯一的标识JID,即实体地址,用来标识一个用户。JID格式采用形式是nodedomain/resource,其中node表示用户在服务器上注册的用户名,domain表示接点不同的设备或位置。XMPP协议包括三个顶层XML元素:Message,Presence和IQ。进展情况说明:在这段期间内,针对所研究的内容通过图书馆、中国知网、网络资源等多种途径进行了资料的收集,收集的资料包括书籍、期刊文献等。与此同时成功搭建ANDROID平台环境包括下载eclipse,SDK,JDK,ADT插件.试运行了几个示例小程序如:hello android。四、研究过程中遇到的困难和问题以及解决的措施: 遇到的困难和问题: 1.ANDROID近期相关文件在校图书馆相当匮乏,查阅书店的相关书籍也颇费了一番力气。还好功夫不负有心人加上在老师的帮助下还是找到了相应的书籍。 2.ANDROID平台环境搭建也异常艰辛。国内网络封闭了ANDROID SDK的官方开发下载页面,只能下载到SDK Manage来在线下载,而下载的速度只有几kb着实花费了大量的时间。 3.ANDROID的应用构成在理解上也是难点。对于一个ANDROID应用程序来说,是由Activity,Intent Receiver,Service,Content Provider四部分组成。在应用程序中使用时,需要在配置文件ANDROIDMainfest.xml中进行配置。这个配置文件是每个ANDROID应用程序所必需的,用于定义应用程序的组件,组件的功能以及必要条件等。Activity是构成应用程序中最重要的改造模块,在ANDROID应用程序中,机会都是通过ACTIVITY来与用户进行交互,所以ACTIVITY主要负责的就是创建于用户进行交互的显示窗口,你可以在这些窗口里通过调用setContentVIEW方法来显示你自己的用户界面。Activity在系统中以活动栈的形式进行管理。当一个新的活动启动后,它被放到了栈顶,成为了运行活动,而新活动之前的活动在活动在活动栈里总位于新活动之下,直到新的活动推出才重新回到前台。Activity有三个关键的循环:(1)活动的整个生命周期(2)活动的可见生命周期(3)活动的后台生命周期。Intent Receiver是用于对外部事件响应,当外部事件发生时,会使用NOTIFICATIONMANAGER通知用户。当一个INTERNT RECEIVER被触发时,系统会在需要的时候启动对应的应用程序。Service是不带UI提供连续信息的应用程序。它是运行于应用程序后台的服务,在用户进行其他活动的时候,这个服务将一直运行在后台知道用户停止该服务或服务运行结束。Content Provider应用程序能够提供它们的数据保存到文件,SQL数据库和其它存储设备中。当应用程序需要使用存储设备中的数据时,可以用CONTENT PROVIDER来完成。使用CONTENT PROVIDER能够灵活的替换底层存储设备的细节,从而使应用系统具有良好的数据迁移性。 解决的措施:(1) 图书馆:去图书馆查询相关书籍资料,图书馆是一个巨大的学习资源宝库,在那里找到了许多关于 PLL 和 STM32F103xx 的有帮助的资料(2) 网络资源:通过中国知网、万方网等多个论文网站进行资料收集,收集的资料包括期刊文献、硕士论文、博士论文等并对资料中的相关内容进行研究和整理。(3) 咨询:咨询指导老师,与和我的题目相近的同学互相探讨。五、全部参考文献:1 王向辉 张国印 沈洁.ANDROID应用程序开发.清华大学出版社,2010.32 于少山 卡米利 毛依丁 基于XML的即时通讯系统的研究与实现重庆邮电大学学报 2007年6月59-613 姚昱曼 刘卫国 Android与J2ME平台间即时通讯的研究与实现 计算机应用 2008年第12期118-1204 孙卫琴 Java网络编程精解 电子工业出版社2007.35 张容 苗放 李刚 XMPP及其在即时通讯系统的文字通信模块中的应用.重庆工学院学报.2008年2月.92-956 倪天龙 张贤高 王培.数据库SQLite在嵌入式系统中的应用J.单片机与嵌入式系统应用,2005(10):35-377 马越.Android的架构与应用电信网络与计算机网络的通信D.北京:中国地质大学,2008:9-208 公磊 周聪.基于Android的移动终端应用程序开发与研究J.计算机与现代化,2008(8):85-899 潘凤 王华军 苗放 李刚.基于XMPP协议和Openfire的即时通讯系统的开发J.计算机时代,2008(3):15-1910 贾琴勇.即时通讯系统的研究与实现D.武汉:武汉理工大学,2008:283611 贾学锋.基于TCP协议的NAT穿透技术在P2P中的研究与实现J.计算机应用与软件,2008(6):186-18712 程杰.大话设计模式M.清华大学出版社,2007:123-14013 McGraw.Hill.Android.A.Programmers.Guide.Jul.2008.eBook-DDU14 Jason Morris.Android User Interface Development.Packt Publishing Ltd201115Donn Felker Android Applicatioin Development For Dummies.D 201016J.F.Dimarzio Android A Progranmmers Guide Mc Graw Hill.2008外文文献翻译情况:已完成指导教师意见:签名:年 月 日系主任意见:签名:年 月 日评审教师意见:签名:年 月 日评审结果:教务处制表Android User Interface Development Jason Morris Development.Packt With the rapid development and integration of mobile comrrlunication and Internet,GPRS wireless networks making highspeed access to the Intemet becomes reality such web-based real-time way which other online tigers to interact with,is favored by demanding realtime business and service industries with its convenient featuresTraditional realTime communications applications are mostly realized in the PC side,but with the development of wireless transmission networks,and the introduction of intelligent operating platform provides a hardware foundation mobile devices in real-time communications system has become the new 3G business highlightsInstant messaging is based on applications of Intemet protocol,which can enable users to use different devices to communicateAnd with the constant popularity of mobile phones as well as the continuous performance improvement,it is time for realtime communication systems to transplant from the traditional PCMobile Additionally in the market of Chinas huge mobile phone users,mobile phone users using of instant messaging software is increasingCurrently mobile operating systems ar e too closed,and the maj or instant messaging software communication protocols used are not unifiedAndroid is based on the open-source Linux mobile operating system platform and XMPP is a XML-based open-source instant messaging protocol,S0 Android and XMPPbased instant messaging systems have good application prospectGoogle Android is a Linux-based platform for developing open-source phone operating system (registered trademark in China called ANZHI;). 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 complete mobile software. Google and Open Handset Alliance to develop the Android, the alliance by including China Mobile, Motorola, Qualcomm and T-Mobile, including more than 30 technology and the composition of a leader in wireless applications. Google with operators, equipment manufacturers, developers and other interested parties to form deep-level 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 Linux-based 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 companies themselves to write java.To promote this technology, Google, and dozens of other phone company has established the Open Handset Alliance (Open Handset Alliance).Characteristicapplication framework to support component reuse and replacement Dalvik virtual machine specifically for mobile devices is optimized Internal integrated browser, the browser-based open-source WebKit engine optimization of 2D and 3D graphics library includes graphics library, 3D graphics library based on OpenGL ES 1.0 (hardware-accelerated optional) # SQLite for structured data storage Multimedia support includes the common audio, video and static image file formats (such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) GSM phone (depending on hardware) Bluetooth Bluetooth, EDGE, 3G, and WiFi (hardware dependent) Camera, GPS, compass, and accelerometer (hardware dependent) Rich development environment including a device emulator, debugger, memory and performance analysis charts, and the Eclipse integrated development environment plug-ins ApplicationsA core Android application package together with the release of the application package, including email 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 components; any application can publish its functional blocks and any other applications can use the function block its release (but must follow the framework of security restrictions). Reuse mechanism allows the application form can be user replaced.All of the following applications by the composition of a range of services and systems, including: an expanded view (Views) can be used to build applications, including a list of (lists), grid (grids), text boxes (text boxes), buttons (buttons), and even an embeddable web browser Content Manager (Content Providers) allows applications to access data from another application program (such as the contact database), or to share their own data. A resource manager (Resource Manager) to provide access to non-code resources, such as local strings, graphics, and hierarchical file (layout files). a notification manager (Notification Manager) allows applications to customers in the status bar display notification information. an activity class Manager (Activity Manager) to manage the application life cycle and provides common navigation rollback feature.Ordering the systemOrdering the system information using automated software tools to achieve la carte, side dishes, stir fry vegetables to the transfer of all management processes; completion point, the computer management menu, point the menu and the kitchen, front-end checkout synchronization print; achieved without the menu paper-based operation; backstage manager of inquiry; warehouse inventory management and so on.In addition, ordering the system can also effectively manage customer data, archiving and future reference, put an end to the restaurant leakage List, run list phenomenon; help restaurants using computer data processing capability and powerful ability to process optimization to achieve automated management, streamline workflow restaurant, reduce waste and man-made phenomenon of management oversight, re-optimal allocation of corporate resources, the operating costs to a minimum.Powerful addition to ordering the system to support the general application of stand-alone and LAN in addition to support head office / branch of multi-level framework used for remote network using the POS system to achieve front store sales cashier, sales of small-ticket instantly print sales day-end, reporting sales data and receive information of new features dishes.There are three currently ordering the system to achieve mode:First, the touch screen a la carte model: It uses the currently most popular touch-computer ordering process to achieve that members can to order the software screen prompts, simply click on the screen with your fingers can complete the entire ordering process and convenient This model applies to the practice of rich dishes and large restaurants, restaurants, and restaurant, etc.Second,the wireless PDA ordering mode: it uses a wireless WiFi technology, a la carte interface by PDA display, use touch pen to complete the ordering process, virtually anywhere, anytime to order real-time response, this model is more suitable for dishes and practices simple restaurant, features a restaurant and special mood of senior restaurants. Third, the wireless ordering Po mode: it uses the ISM band, can be a floor or other obstruction in the case of seamless coverage up to 10 meters away, while the signal remained stable, which is the ratio of the wireless PDA ordering models greatest strength, this model applies to simple dishes and practices and other requirements with fewer fast food restaurants, pot shops.What Is an XML-Based Layout?As the name suggests, an XML-based layout is a specification of widgets relationships to each otherand to their containers encoded in XML format. Specifically, Android considers XML-based layouts to be resources, and assuch, layout files are stored in the res/layout directory inside your Android project.Each XML file contains a tree of elements specifying a layout of widgets and containers that make up one View hierarchy. The attributes of the XML elements are properties,describing how a widget should look or how a container should behave. For example, if a Button element has an attribute value of android:textStyle = bold, that means that the text appearing on the face of the button should be rendered in a boldface font style.Androids SDK ships with a tool (aapt) that uses the layouts. This tool should beautomatically invoked by your Android toolchain (e.g., Eclipse or Ants build.xml). Of particular importance to you as a developer is that aapt generates the R.java source file within your project, allowing you to access layouts and widgets within those layouts directly from your Java code. Why Use XML-Based Layouts?Most everything you do using XML layout files can be achieved through Java code. For example, you could use setTypeface() to have a button render its text in bold, instead of using a property in an XML layout. Since XML layouts are yet another file for you to keep track of, we need good reasons for using such files.Perhaps the biggest reason is to assist in the creation of tools for view definition, such as a GUI builder in an IDE like Eclipse or a dedicated Android GUI designer like DroidDraw. Such GUI builders could, in principle, generate Java code instead of XML.The challenge is rereading the UI definition to support edits, which is far simpler when the data is in a structured format like XML rather than in a programming language.Moreover, keeping generated XML definitions separated from handwritten Java code makes it less likely that someones custom-crafted source will get clobbered by accident when the generated bits are regenerated. XML forms a nice middle ground between something that is convenient for tool writers to use and easy for programmers to work with by hand as needed.Also, XML as a GUI definition format is becoming more commonplace. Microsofts Extensible Application Markup Language (XAML), Adobes Flex, and Mozillas XML User Interface Language (XUL) all take a similar approach to that of Android: put layout details in an XML file and put programming smarts in source files (e.g., JavaScript for XUL).Many less well-known GUI frameworks, such as ZK, also use XML for view definition.While following the herd is not necessarily the best policy, it does have the advantage of helping to ease the transition to Android from any other XML-centered view description language. Android的用户界面开发 随着移动通信与Internet的飞速发展及相互融合,GPRS使无线网络高速接入到Intemet成为现实,这种以网络为基础的、与其它在线用户进行信息交互的实时方式,以其方便快捷的特点,受到了对消息反馈即时性要求很高的商业和服务行业的青睐。传统的即时通信应用大部分是在PC端实现的,但随着无线传输网络的发展,各种智能操作平台的推出提供了硬件基础,在移动设备上的即时通信系统的研究成为了3G业务新的亮点。 即时通讯是基于互联网协议的应用程序,它能够使应用不同设备的用户进行通信,随着手机的不断普及以及性能的不断提升,为即时通讯系统从传统的PC机到手机的移植提高了很好的条件。而且在中国庞大的手机用户中,通过手机使用即时通讯软件的用户越来越多。当前的手机操作系统都过于封闭,各大即时通讯软件采用的通讯协议也不统一,而Android是基于Linux的开源的手机操作系统平台,XMPP是基于XML的开源的即时通讯协议,因此基于Android平台和XMPP协议开发即时通讯系统具有很好的应用前景。Android 是Google开发的基于Linux平台的开源手机操作系统(在华注册商标名为“安致”)。它包括操作系统、用户界面和应用程序 移动电话工作所需的全部软件,而且不存在任何以往阻碍移动产业创新的专有权障碍,号称是首个为移动终端打造的真正开放和完整的移动软件。Google与开放手机联盟合作开发了 Android,这个联盟由包括中国移动、摩托罗拉、高通和 T-Mobile 在内的 30 多家技术和无线应用的领军企业组成。Google通过与运营商、设备制造商、开发商和其他有关各方结成深层次的合作伙伴关系,希望借助建立标准化、开放式的移动电话软件平台,在移动产业内形成一个开放式的生态系统。它采用了软件堆层(software stack,又名软件叠层)的架构,主要分为三部分:底层以Linux核心为基础,由c语言开发,只提供基本功能。中间层包括函数库Library和虚拟机Virtual Machine,由C+开发。最上层是各种应用软件,包括通话程序,短信程序等,应用软件则由各公司自行开发,以java编写。为了推广此技术,Google和其它几十个手机公司建立了开放手机联盟(Open Handset Alliance)。特性应用程序框架 支持组件的重用与替换 Dalvik虚拟机 专门为移动设备做了优化 内部集成浏览器 该浏览器基于开源的WebKit 引擎 优化的图形库 包括2D和3D图形库,3D图形库基于OpenGL ES 1.0 (硬件加速可选) #SQLite 用作结构化的数据存储 多媒体支持 包括常见的音频、视频和静态印象文件格式 (如 MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) GSM电话 (依赖于硬件) 蓝牙Bluetooth, EDGE, 3G, and WiFi (依赖于硬件) 照相机,GPS,指南针,和加速度计 (依赖于硬件) 丰富的开发环境 包括设备模拟器,调试工具,内存及性能分析图表,和Eclipse集成开发环境插件应用程序Android会同一个核心应用程序包一起发布,该应用程序包包括email客户端,SMS短消息程序,日历,地图,浏览器,联系人管理程序等。所有的应用程序都是用JAVA编写的。Android 应用程序框架开发者也完全可以访问核心应用程序所使用的API框架。该应用程序架构用来简化组件软件的重用;任何一个应用程序都可以发布它的功能块并且任何其它的应用程序都可以使用其所发布的功能块(不过得遵循框架的安全性限制)。该应用程序重用机制使得组建可以被用户替换。以下所有的应用程序都由一系列的服务和系统组成,包括:一个可扩展的视图(Views )可以用来建应用程序,包括列表(lists),网格(grids),文本框(text boxes),按钮(buttons),甚至包括一个可嵌入的web浏览器 内容管理器(Content Providers )使得应用程序可以访问另一个应用程序的数据(如联系人数据库),或者共享它们自己的数据。 一个资源管理器 (Resource Manager

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论