




已阅读5页,还剩13页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
题目: 基于android 的任务管理器的设计一、 本课题的内容及研究意义随着移动互联网的蓬勃发展,手机作为移动互联网最重要的承载设备,在人们日常生活中所扮演的角色越来越重要。人们开始关注手机应用的多元化和功能的强大,在满足消费者越来越高的要求方面,智能手机成为了最好的选择。同时也正是基于这种原因,智能手机在手机市场扮演着非常重要的角色,而且相应的智能手机应用领域也变得火爆起来,对智能手机平台的研究与开发是当前移动计算技术发展中最为活跃的领域,从中我们不难看出智能手机所蕴含着广阔发展前景。智能手机需要操作系统平台的支撑,研究智能手机软件的根本就是要研究智能手机平台的软件开发。现在虽然手机生产厂商众多,但是操作系统平台不开源,各种应用放上去非常困难。为此,Google于2007年11月推出了一个专为移动设备设计的软件平台Android,它的出现打破了这些格局,使世界手机市场产生了巨大的变化。android系统目前还有很多缺陷,我认为一个很大问题就是正常关闭的程序总会在后台运行,无法完全关闭。导致很多进程不能立刻结束,在后台运行就占用了内存,影响了系统的运行速度,还严重浪费了手机电量和流量。Android系统最大的优势在于与互联网贴合紧密,使用Android系统手机可以尽享移动互联网带来的欢乐。但是,有没有想过这种谷歌引以为豪的优势有一天会变成消费者眼中的大敌。查看一下网上的记录,有多少人抱怨Android系统手机费流量,原来塞班时候30M玩一个月的时代已经一去不复返了,还有现在普遍的用户都反应手机电池续航能力很差,基本一天一充,让用户很是头疼。据说iPhone4虽然是单核512M内存,但是比Android的双核1G内存的操作起来更流畅,iPad2虽然是也只有512M的内存但是操作起来比Android四核1G内存还要流畅。另外在安全性方面也不如iOS。造成Android性能,待机时间,操作流畅和安全性不好的原因是Android后台进程的管理。Android的进程管理很差劲,这也是它性能差的原因,操作的流畅性,待机时间,性能都跟进程管理,特别是后台进程的管理有很大关系。打开手机一看,有几十条进程在跑,比如短信,邮件,输入法等系统核心应用,另外还有很多很应用也都在后台运行,不管是否是用户启动的,很多应用都在后面跑,这点已经成为Android用户最受困扰的地方。更为可气的是很多进程用任务管理器,进程杀手等工具杀都杀不掉。主要的原因就是Android中的关键的组件都有着过长的生命周期,比如BroadcastReceiver和Service,还有就是线程的不正当应用。Service就是专门用于在后台长期运行的组件,用以在后台完成长期的任务比如在后台播放歌曲,在后台接收邮件和短信等等。BroadcastReceiver是一种长期存在的组件,它正常时候是处于不活跃的,只有当其感兴趣的Intent广播出现时就被激活,虽然它不活跃,但是它依然活着,它所在的进程依然运行。此外,Activity也可以长期的运行,通过moveTaskToBack()就可以不销毁的把Activity放到后台去,或者在Activity中运行Thread,如果在Activity销毁时没把Thread停止,那么Thread就会仍然运行,进程就会仍然运行。这是Android系统架构决定的,对于有组件在运行的进程,即使用任务管理器把它杀掉,那么ActivityManager还会把这个进程重启。所以对于Android的程序来讲,需要开发者的努力才能正确的应用这些组件让应用在用户用到的时候运行,不需要的时候就完全退出。了解了android的这些缺点,努力去解决这些给用户带来的不便和影响。所以这次设计目标是设计出一个简单的任务管理器,能够实现一些任务管理器的基本功能,能够查看正在运行的所有程序及占用内存情况;可以把程序完全结束掉;清理缓存资源。这样释放出内存资源,有利于提升手机运行速度,提高手机续航能力,降低隐形流失的流量对用户的压力。这都对android系统的发展及以后的研究都很有意义。二、 研究现状和发展趋势作为最近几年才涌现的智能手机操作系统,Android 操作系统无疑是一个新手,但是借助 Google 牵头的开放手机联盟的成功运作,多家智能手机制造商不断推出基于 Android 操作系统的智能手机,使 Android操作系统的市场份额以及影响力与日俱增,其前景正被越来越多的人看好。基于 Android 平台进行软件应用的开发,只需要开发者搭建一个完整的Android环境,利用java语言及Android自身的开发包就可以进行 Android 应用程序的开发。而在现今的环境下,专业的java开发团队比比皆是,他们可以很快掌Android软件开发技术,这就意味着Android软件开发将拥有庞大的技术支持。Android兴起时间短暂,手机软件相对于存在已久的塞班手机软件等,其丰富性及功能性都稍逊一筹。但Android软件在一两年的时间内已经迅速发展,在各类型应用系统中都有令用户满意的成果,而Android的开放系统以及现在的发展趋势都预示着 Android手机将在未来的手机市场中异军突起,成为手机领域的佼佼者指日可待。Android的主要竞争对手是苹果公司的iOS以及RIM的Blackberry OS。2011年第一季度,Android在全球的市场份额首次超过塞班系统,跃居全球第一。 2012年2月数据,Android占据全球智能手机操作系统市场52.5%的份额,中国市场占有率为68.4%。现在市场上的基于 Android 的应用系统可以大体分为系统工具、影音播放、文件浏览管理、联络工具、休闲娱乐、生活助手、软件超市等七大类。网络上已经有很多各式各样的应用, android 应用已经是遍地开花,了解了android进程为基础上开发设计一个很重要的应用任务管理器也有很多已经面世,能实现很多功能,但也大多是些基本功能,实现程序进程的结束和管理等,目前已经能满足一些市场需求。目前android手机的迅速发展,对android任务管理器的需求也是直线上升,各大应用下载中心下载排行的任务管理器也是趋于前列。何种任务管理器更符合用户的需求,更大程度的满足用户,在我看来以后的更多的任务管理器设计肯定是向着更多功能结合方向发展,更加便捷管理模式靠拢,让用户更加简便明了的了解和控制自己android系统中的所有程序。这也是我这次毕业设计将努力的方向。三、 研究方案及工作计划本系统设计的思路是为具体解决Android平台部分缺点出发,本系统设计目标是设计并开发实现一个使用方便的任务管理系统,类似于对于手机上的资源进行方便的管理。并能实现对于任务进度的管理,将最后系统固化于手机平台之上,最终完成完成Android智能手机平台定制。这次以Android手机平台为中心,从软件和硬件上分析在Android手机平台上的的开发流程和基本的方法、技巧,并最终完成一个基于android手机平台上的任务管理系统。从软件的最底层到最上层进行了分析:从启动代码到内核再到驱动、进程系统,最后到Android应用层。本次毕业设计论文将对底层软件以及上层软件开发过程中的环境进行了介绍,针对每层的特点对调试方法进行了分析和选择。以实际系统开发为例,系统说明android平台开发流程,深入了解Android系统。总之,先把开发环境搭建好:JDK、Eclipse、Android SDK的安装和环境配置。后面细节模块的实现自己要把以前所学的操作系统,软件工程等学科结合起来,自己还要查阅很多资料,边学边实践。努力把这次毕业设计很好的完成。l 明确设计任务,收集并阅读相关资料,约需0.5周。l 了解和掌握android,约需0.5周。l 需求分析,约需1周。l 概要设计,约需2周。l 详细设计,约需4周。l 系统的测试与优化,约需2周l 撰写毕业论文,约需1周l 论文答辩准备,约需0.5周。l 论文答辩,约需0.5周。各周任务计划起止日期周次任务说明2/203/4第1周完成开题报告第2周3/53/11第3周工作实习3/123/18第4周查阅资料,了解课题收集和阅读相关资料文献,对课题和相应的开发平台作充分了解。3/193/25第5周需求分析获得对整个毕业设计的整体把握,完成设计需求、目标。3/264/8第6周概要设计完成系统概要设计第7周4/95/6第8周系统详细设计完成系统软件的编制,并完成各个模块的测试。第9周第10周第11周5/75/20第12周调试与测试优化对系统进行调试,是软件系统能正常运行。 第13周5/215/27第14周撰写毕业论文5/286/3第15周答辩准备和答辩四、 主要参考文献1 Android 介绍.百度百科 /view/1241829.html2 汪源,刘芳. Android的进程与单线程模型浅析J.仪器仪表用户 2011(05):77-783马越. Android的架构与应用D中国地质大学(北京), 2008 .4叶炳发. Android操作系统移植及关键技术研究D暨南大学, 2010 .5刘必刚. Android通信模块的设计与优化D武汉理工大学, 2010 .6岳传真. Android系统移植和应用程序开发D复旦大学, 2010 .7陈勋. 基于android平台的资源管理器设计D电子科技大学,2011.8吴想想. 基于Android平台软件开发方法的研究与应用D北京邮电大学,2011.9 朱婷婷,李慧. 基于Android的应用软件的综述J.电脑与电信2011(01)42-4310 宋小倩,周东升.基于Android平台的应用开发研究J.软件导刊 2011(02)104-10611 Lauren Darcey, Shane Conder. Android Wireless Application Development.Addison-Wesley Professional, 2009:112-121,.12 Enck W, Ongtang M, McDaniel P. Understanding Android Security. IEEE Computer Society, 2009:178-191.13 Stanislav Pavlov, Pavel Belevsky. Windows Embedded CE 6.0 Fundamentals.USA:Microsoft Press,2008:98-100.14J.F.DiMarzio, Android A Programmers Guide,2008.外文文献选译Android: A Programmers GuideKey Skills & Concepts Creating new Android projects Working with Views Using a TextView Modifying the main.xml file Running applications on the Android EmulatorTo make sure that you get a good overall look at programming in Android, in Chapter 6 you will create both of these applications in the Android SDK command-line environment for Microsoft Windows and Linux. In other words, this chapter covers the creation process in Eclipse, and Chapter 6 covers the creation process using the command-line tools. Therefore, before continuing, you should check that your Eclipse environment is correctly configured. Review the steps in Chapter 3 for setting the PATHstatement for the Android SDK. You should also ensure that the JRE is correctly in your PATH statement.TIPIf you have configuration-related issues while attempting to work with any of the command-line examples, try referring to the configuration steps in Chapters 2 and 3;and look at the Android SDK documentation.Creating Your First Android Project in Eclipse.To start your first Android project, open Eclipse. When you open Eclipse for the first time, it opens to an empty development environment (see Figure 5-1), which is whereyou want to begin. Your first task is to set up and name the workspace for your application. Choose File | New | Android Project, which will launch the New Android Project wizard.CAUTIONDo not select Java Project from the New menu. While Android applications are written in Java, and you are doing all of your development in Java projects, this option will create a standard Java application. Selecting Android Project enables you to create Android-specific applications.If you do not see the option for Android Project, this indicates that the Android plugin for Eclipse was not fully or correctly installed. Review the procedure in Chapter 3 for installing the Android plugin for Eclipse to correct this.The New Android Project wizard creates two things for you: A shell application that ties into the Android SDK, using the android.jar file, and ties the project into the Android Emulator. This allows you to code using all of the Android libraries and packages, and also lets you debug your applications in the proper environment. Your first shell files for the new project. These shell files contain some of the vital application blocks upon which you will be building your programs. In much the same way as creating a Microsoft .NET application in Visual Studio generates some Windows-created program code in your files, using the Android Project wizard in Eclipse generates your initial program files and some Android-created code.In addition, the New Android Project wizard contains a few options, shown next, that you must set to initiate your Android project.Figure 5-1 The empty Eclipse development environmentFor the Project Name field, for purposes of this example, use the title HelloWorldText.This name sufficiently distinguishes this Hello World! project from the others that you will be creating in this chapter.In the Contents area, keep the default selections: the Create New Project in Workspace radio button should be selected and the Use Default Location check box should be checked.This will allow Eclipse to create your project in your default workspace directory. The advantage of keeping the default options is that your projects are kept in a central location,which makes ordering, managing, and finding these projects quite easy. For example, if you are working in a Unix-based environment, this path points to your $HOME directory.If you are working in a Microsoft Windows environment, the workspace path will be C:/Users/workspace, as shown in the previous illustration.However, for any number of reasons, you may want to uncheck the Use Default Location check box and select a different location for your project. One reason you may want to specify a different location here is simply if you want to choose a location for this specific project that is separate from other Android projects. For example, you may want to keep the projects that you create in this book in a different location from projects that you create in the future on your own. If so, simply override the Location option to specify your own custom location directory for this project.On the other hand, you may be required to specify a project location if you did not check the Use This as the Default and Do Not Ask Again check box in the Select a Default Workspace dialog box during the Eclipse setup (as recommended in the last section of Chapter 2). Checking that box during the Eclipse setup defaults all new projects to the workspace directory (and provides the default location shown in the Location field of the New Android Project wizard). If you did not check this box during the Eclipse setup process, you need to select a path for your new project now by clicking the Browse button and navigating to it.The final three options in the New Android Project wizard are in the Properties area.These properties define how your project is integrated into the Android environment. In the Package Name field, you specify the namespace given to your application package.For example, android.app.Activity or com.google.android.map.MapActivity.CAUTIONThe package name adheres to the standard Java package-naming guidelines, which were established to lower the risk of two packages being released with the same name.The top level of the package name is the domain identifier of the company (com, org,and net are examples). This is followed by the domain name, such as google. Finally, a descriptive title for the contents of the package is provided. For purposes of this chapter,my package name for the Hello World! application will omit “com” to identify that it is a text application and not meant to be published. All future packages created in this book will be publishable and use the com identifier.For the HelloWorldText application, use the package name android_programmers_guide.HelloWorldText. This name uniquely identifies the code that belongs to this application and differentiates this test application from others you will develop in this book.CAUTIONIf you are paying attention to the screen as you are typing, you will notice that an error message appears at the top of the wizard as you enter the package name, stating that you must fill out all the fields properly to continue. This error message is premature and can be a bit confusing because you have not even attempted to fill out the other fields in the Properties area. If you see such an error message, just ignore it and continue on and complete the next two fields in Properties area.The next Properties field, Activity Name, is required because it is the reference to the main screen of your application. That is, think of the Activity as the “window” within which your application is displayed. Without an Activity, your application would not do very much. However, because Android applications can be composed of several Activities, the New Android Project wizard needs to know which Activity will be the default. Activity Name is a required field and has no default, so you must supply one to continue (as indicated in the preceding caution). For purposes of this example, use HelloWorldText. This keeps the application simple and is just about as descriptive as it needs to be for the moment.The final Properties field, Application Name, specifies the name of your application.This is the name that will be used to manage your application when it is installed on the device. Again, for the sake of keeping things simple, go with HelloWorldText as the application name. The following illustration shows the completed New Android Project wizard.TIPThe Application Name and the Activity Name fields do not have to match. In fact, many programmers are used to the older conventions whereby the “starting” screen of an application is usually called Main or Startup. Use whatever conventions you are comfortable with. For purposes of demonstration, this chapter assumes that you are using the names suggested.Click Finish to kick off the creation process. The wizard runs a background process that facilitates the auto-generation of some required files, and the setup of the directory structure needed to support an Android application. When the process is complete, you will have your first Android application project, like that shown in Figure 5-2.Figure 5-2 Your first Android application projectTIPIf the Finish button is not available to you, you may have made an error in one of the fields in the Properties area. To ensure that the Properties fields are correctly filled in,Eclipse will not allow you to finish the process if any of the information that you entered may cause problems. Go back and make sure that all of the Properties fields are correctly filled in.The next section examines the contents of the auto-generated Android files and the purpose of some of the shell items for your application.Examining the Android-Created Files This section discusses the new files that Android has just created for you. A fairly robuststructure has been created for you, and if you do not know what you are looking at, you may end up putting some code in places that you should not. There are files provided by Android that you need to modify, and there are ones that you should not modify; knowing the difference may save you from having to re-create your project.With your new application project open, take a look at the Package Explorer, one of two tabs located in the pane to the left of the main development area. The following illustration shows what the Package Explorer should look like.NOTEIf the Package Explorer is not open, you can activate it by choosing Window | Show View | Package Explorer.You should see a root directory, in this case named HelloWorldText. The root directory is the home, or repository, for all of your project files. Both your user-created files and the Android auto-generated files will be placed in the directory, easily accessible from the Package Explorer. Currently there should be a few items in your root directory: an AndroidManifest.xml file, a package included in the Referenced Libraries, and three directories (res, assets, and src). These items are discussed in turn next.AndroidManifest.xmlThe AndroidManifest.xml file is where your global settings are made. If you are an ASP.NET developer, you can think of AndroidManifest.xml as Web.config and Global.asax rolled into one. (If you are not an ASP.NET developer, this means that AndroidManifest.xml is a place for storing settings.) AndroidManifest.xml will include such settings as application permissions, Activities, and intent filters.The standard AndroidManifest.xml file should contain the following information:As you create future applications, you will be adding information to this file. Notice that the package name you supplied is listed here, as well as the action that your Activity will handle.译文:Android程序:Hello World! -第五章(1)关键技能和概念 创建新的Android 项目 同Views 一起工作 使用一个TextView 修改main.xml 文件 在Android 模拟器上运行应用程序为了让你能够对在Android 上编程有一个良好的印象,在第六章,你会在Windwos 平台和Linux 平台上使用Android SDK 创建命令行应用程序。或者说,本章包含了在Eclipse 创建程序的过程,第六章包含了使用命令行工具的创建过程。因此,在继续之前,你应当检查你的Eclipse 的开发环境是否被正确的配置。再次回顾一下第三章关于Adnroid SDK 的PATH 声明。同时要确保JRE 也是在你的PATH 声明中。提示如果当你运行命令行示例,有任何与配置有关的问题时,请参考第二章和第三章提到的步骤,并且查看Android SDK 文档。在Eclipse 中创建你的第一个Android 项目要开始你的第一个Android 项目,打开Eclipse.当你第一次打开Eclipse,它会打开一个空开发环境,这就是你要开始的地方。你的第一个任务是设置并且命名一个工作空间。选择文件| 新建|Android 项目,使你能够创建一个Android 特有的应用程序向导。注意:不要从新建菜单上选择Java 项目。你的Android 应用程序是在Java 中写的,并且你在Java 项目中进行开发,这个选项会创建一个标准的Java 应用程序。选择Android 项目来创建一个Android 特有的应用程序。如果你没有看到啊Android 项目这个选项,这就说明在Eclipse 中,Android plugin 没有被完全或者正确的安装。重新检查第三章中关于Android plugin 的安装程序来修正这个问题。新的Android 项目向导为你创建2 个东西: 一个绑住Android SDK 的壳程序。这个将允许你使用所有Android 库和包来进行编码工作,并且允许你在合适的环境中调试程序。 新程序的第一个壳文件。这些壳文件包含一些必要的支撑你将要编写程序的文件。就如同一个在Visual Studio 中,它会在你的文件中产生的一些代码。使用Eclipse 中的Android 项目向导产生一些初始的程序文件和一些Android 创建的代码。另外,新的Android 项目向导包含一些你必须输入的选项。在项目的名称那个字段,只是为了举例,使用HelloWorldText 这个名字,这个名字非常的容易把这个Hello World 项目从其它你将要在本章中创建的项目分别开。在内容那个区域,保持缺省的选择:在工作区中创建一个新的项目这个选项必须被选中。并且使用缺省的位置这个选择框也应当被选中。这个将允许Eclipse 在你缺省的工作区路径中创建你的项目。这样做的好处是很容易对你的项目进行排序,管理和查找。例如,如果你在工作在一个Unix 基础的开发环境中,这个路径指向Home 路径。如果你工作在一个Windows 的环境中,工作路径将会是C:/Users/workspace。总之,有一些原因,你可能需要不选中缺省位置的选择框并且选择一个其它的路径。如果是这样的话,不管那个位置的选项,自己选一个好了。另外一方面,如果你在Eclipse 设定(在第二章的最后一节中)中没有选中“使用这个作为缺省并且不要再询问”,你可能被要求定义一个项目的位置。在Eclipse 的设置中选中“所有的新项目使用缺省工作空间路径设定”(并且提供在新Android 项目向导位置字段)。如果你在Eclipse 设定过程中不选中这个选择框,你需要通过点击浏览按钮并导航来选择一个路径。
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 赡养协议书范文
- 暑假培优练:平抛运动(学生版)-2025高一物理暑假专项提升(人教版)
- 人教版八年级英语上册Unit4标准检测卷(含答案)
- 新解读《GB-T 18508-2014城镇土地估价规程》
- 图形的变换-2023学年九年级数学专项复习(沪教版)
- 重庆创业红娘培训课件
- 老年人肿瘤课件
- 《商务英语阅读3》课程简介与教学大纲
- 《大学英语2A》课程简介与教学大纲
- 醉翁亭记课件
- 物业员工冬装采购方案(3篇)
- 网店客服教案网店客服岗前准备ITMC网店客户服务实训系统介绍
- 国际经济法课件马工程版
- 留学生中国文化课课件
- (完整版)抛丸机安全操作规程
- 电子工程师(PCB设计)笔试试题及答案
- 呼吸衰竭个案护理
- 2025年森林植被恢复费森林抚育项目方案投标文件(技术方案)
- 数字人民币推广专员考试试卷及答案
- 新车销售培训课件
- 中学群团工作管理制度
评论
0/150
提交评论