资源描述
个性通信录毕业答辩论文
广东科贸职业学院2013届毕业设计
广东科贸职业学院2013届学生
毕业论文/设计
题 目: __个性通信录___
姓 名: ____陈小玲 _______
系 别: __信息工程系___
专 业: __计算机应用___
班 级: __10应用1班___
指导老师: _ _ 张平华
日 期: x年x月x日_
独 创 性 声 明
本人声明所呈交的毕业论文(设计)是本人在指导教师指导下进行的研究工作及取得的研究成果。据我所知,除了文中特别加以标注和致谢的地方外,论文(设计)中不包含其他人已经发表或撰写过的研究成果,也不包含为获得广东科贸职业学院或其他教育机构的证书而使用过的材料。与我一同工作的同志对本论文(设计)所做的任何贡献均已在论文中作了明确的说明并表示谢意。
论文(设计)作者签名:陈小玲
签字日期:x年 x 月 x 日
摘要
随着智能手机的快速普及,智能手机操作系统市场风生水起。为了让智能手机用户能够随时随地查询互联网所提供的服务,一种高效的办法就是将应用系统的功能拓展到手机终端上,让手机能够通过移动网以及互联网访问Web网站并处理各种各样的业务。因此,智能手机的应用软件及其需要的服务将有广阔的发展前景。
Android是一种以Linux为基础的开源代码操作系统,主要应用于手机,因为其良好的人机交互能力和能够安装使用众多功能各异的应用软件而深受人们喜爱,本文就介绍其基于Android 2.2版本开发的一个“个性通讯录”。根据当下人们的使用习惯和实际需求,本文对通讯录提出了新的构想和设计,并在这样的基础上,构建实现了该通讯录.
关键字:android;个性通信录;智能手机平台
目 录
摘要 - 3 -
第一章 前 言 - 3 -
1.1 研究内容 - 3 -
1.2 研究意义 - 3 -
1.3研究现状和发展趋势 - 3 -
第二章 系统开发环境及相关技术 - 3 -
2.1Android开发环境的搭建 - 3 -
2.1.1Android软件开发包下载 - 3 -
2.1.2其他注意事项 - 3 -
2.1.3环境安装与搭配 - 3 -
2.2本章小结 - 3 -
第三章系统总体设计 - 3 -
3.1数据库设计 - 3 -
3.1.1Android数据库概述 - 3 -
3.1.2数据库表详细设计 - 3 -
3.2 概念设计图 - 3 -
3.3本章小结 - 3 -
第四章 系统的详细设计 - 3 -
4.1 界面布局与设计 - 3 -
4.1.1主界面设计 - 3 -
4.1.2 填写联系人信息设计界面 - 3 -
4.1.3联系人信息展现页面 - 3 -
第五章 调试与部分主要的代码 - 3 -
5.1部分功能模块实现与截图展示 - 3 -
5.2本章小结 - 3 -
致谢 - 3 -
参考文献 - 3 -
第一章 前 言
1.1 研究内容
Android平台3G手机个性通信录软件是基于Android手机平台,运用Java语言,从Google上获取通信录联系人信息,开发出针对使用Android平台的手机个性通信录系统。
1.2 研究意义
随着3G网络的使用,移动终端不再仅是通讯网络的终端,还将成为互联网的终端。因此,移动终端的应用软件和需要的服务将会有很大的发展空间。在Google和Android手机联盟的共同推动下,Android在众多手机操作系统中脱颖而出,受到广大消费者的欢迎。手机通讯录作为手机的基本功能之一,每天我们都在频繁地使用着。根据手机功能使用调查显示,有9成以上的消费者使用手机通讯录功能。随着手机通讯录功能的不断加强与完善,手机通讯录对于人们的意义,已不仅仅像记事薄一样显示通讯地址,而是向着个性化、人性化的方向发展
。通讯录从无到有,从英文到中文,经过了十几年的发展历程,今后的发展趋
势就是从通讯录发展为名片夹,也就是一个人名下,可以存储座机、手机、
单位、地址、电子邮件等内容。这种名片夹在电话薄的基础上,大大丰富了
内容,同时结构也发生了革命性变化,而且随着手机的发展,相信更优秀的通信录会越来越受到社会各层人士的喜爱。
1.3研究现状和发展趋势
互联网相比此前,发展将更迅速,终端设备将更普及,我们从过去的第一季度,看出今年中国移动互联网会呈现怎样的发展趋势呢? 根据友盟移动统计分析平台的部分数据,对中国移动应用发展现状进行研究和分析,并通过对广大移动应用开发者的调查透视了国内App开发者的现状。友盟发布了2012年Q1移动应用及开发者现状报告,如下:
2011年3月——2012年3月 TOP100应用增长趋势
从2011年的3月份到今年的3月份,移动应用无论是活跃用户还是日启动次数都有了十足的增长。我们按照应用的累计安装量作为排序标准,选取了TOP100的应用作为统计样本,研究后发现活跃用户和日启动均比去年的3月份增长了5倍之多。可见越来越多的用户开始接受并享用移动互联网为人们生活带来的便利。
关于中国移动互联网用户的地理分布,广东、江苏、北京、浙江和福建五省或者直辖市排在了前五名的位置,占据了全国用户份额的40.7%。在2011年第三季度的时候,我们也发布一份数据报告,显示用户份额前五的省份或者直辖市是广东、江苏、浙江、北京和上海,占据全国用户份额的44.6%。另外,2011年第二季度前五名省份或直辖市所占总份额是49.4%。不难看出,移动互联网向二线城市蔓延的趋势依然是持续并且不可逆转的。
关于联网方式和运营商,2G上网依然是一半上网用户的选择,占比51.2%。使用3G和WIFI的用户占比分别为14.6%和34.2%。联通和电信凭借其3G套餐和优惠购机业务,市场份额已经分别占据了20%和9.5%。
友盟现在已经服务超过20000名开发者和开发团队,为他们提供专业的统计分析、应用联盟和开发组件产品。为了更好的服务移动互联网创业,友盟在2012年第一季度邀请了广大移动开发者进行了一次全面的问卷调查。调查的几个重要结论如下:
移动互联网个人开发者占比27%,其余为公司或者工作室团队人数小于5人的超过65% 超过85%的开发者&团队选择了Android平台 72%以上的开发者开发的应用数量少于5款
第二章 系统开发环境及相关技术
2.1Android开发环境的搭建
工欲善其事必先利其器,下面介绍一下android开发环境的配置。
2.1.1Android软件开发包下载
(1)JDK4.0 请到网址 下载。
(2)Eclipse3.4(Europe)请到网址 http://www.eclipse.org/downloads/ 下载。 Eclipse IDE for java Developers。
(3) Android SDK1.5 请到网址 下载。
(4) APT插件。
2.1.2其他注意事项
Android的Eclipse插件安装需注意,Eclipse可以对应的网站下载安装,如果通过网络远程安装不成功,可以下载到本地安装。
2.1.3环境安装与搭配
(1) 安装JDK
将下载好的JDK安装好以后,设置环境变量步骤如下:
1) 我的电脑->属性->高级->环境变量->系统变量中添加以后环境变量:
2) JAVA_HOME值为:D:\Program Files\Java\jdk1.6.0_18 (你安装JDK的目录)
3) 在开始追加 %JAVA_HOME%\bin;
安装完成后,可以检查JDK是否安装成功。打开cmd窗口,输入java-version查看JDK版本信息,出现以后画面表示安装成功。
图2-2
(2) 安装Eclipse
将根据上面给的地址下载后安装即可,也可以选择下载绿色版,解压即可使用。
(3) 安装Android JDK
运行SDK Setup.exe,点击Available Packages。如果没有出现可安装的包,请点击Settings,选中Misc中的"Force https://..."这项,再点击Available Packages。选择希望安装的SDK及其文档或者其它包,点击Installation Selected、Accept All、Install Accepted,开始下载安装所选包。在用户变量中新建PATH值为:Android SDK中的tools绝对路径(本机为D:\AndroidDevelop\android-sdk-windows\tools)。
图2-3
点击“确定”重新启动计算机,重启之后进入cmd窗口,检查SDK是不是安装成功,运行android –h ,如果有类似下面的输出,表示安装成功。
图2-4
(4) 安装ADT
1) 打开Eclipse IDE,进入菜单中的”help”->”Install New Software”。
2) 点击Add...按钮,弹出对话框要求输入Name和Location:Name自己随便取,Location输入http://dl-
图2-5
3) 确定返回后,在work with后的下拉列表中选择我们刚才添加的ADT,我们会看到下面出有Developer Tools,展开它会有Android DDMS和Android Development Tool,勾选他们。 如下图所示:
图2-6
完成之后就按提示一步一步next:
i、选择Window > Preferences...
ii、在左边的面板选择Android,然后在右侧点击Browse...并选中SDK路径,本机为:
D:\AndroidDevelop\android-sdk-windows
iii、点击Apply、OK。配置完成。
(5) 创建AVD
为使Android应用程序可以在模拟器上运行,必须创建AVD。
在Eclipse中。选择Windows > Android SDK and AVD Manager。点击左侧面板的Virtual Devices,再右侧点击New。填入Name,选择Target的API,SD Card大小任意,Skin随便选,Hardware目前保持默认值。点击Create AVD即可完成创建AVD。
注意:如果你点击左侧面板的Virtual Devices,再右侧点击New,而target下拉列表没有课选项时,这时候你:
1) 点击右侧面板的Available Packages,在右侧勾选
https://dl-
图2-7
2) 然后点击Install Selected按钮,接下来就是按提示做就行了
要做这两步,原因是在1.3、Android SDK安装中没有安装一些必要的可用包(Available Packages)。
(6) Hello World
通过File -> New -> Project 菜单,建立新项目"Android Project"。
然后填写必要的参数,如下图所示:(注意这里我勾选的是Google APIs,你可以选你喜欢的,但你要创建相应的AVD。
图2-8
点击Finish后,点击Eclipse的Run菜单选择Run Configuration。选择“Android Application”,点击在左上角(按钮像一张纸上有个“+”号)或者双击“Android Application”, 有个新的选项“New_configuration”(可以改为我们喜欢的名字)。
在右侧Android面板中点击Browse…,选择HelloWorld
在Target面板的Automatic中勾选相应的AVD,如果没有可用的AVD的话,你需要点击右下角的Manager…,然后新建相应的AVD。如下图所示:
图2-9
然后点Run按钮即可,运行成功的话会有Android的模拟器界面,如下图所示
图2-10
出现以上画面后,你就可以开始开发属于自己的Android程序了。
2.2本章小结
本章首先对Android的架构进行了全面的介绍,使读者能够对Android内部有了基本的认识和理解。
工欲善其事必先利其器,然后全面详细的介绍了Android开发平台的搭建工作,使读者在开发的时候,能够顺利的搭建好开发环境。
第三章系统总体设计
3.1数据库设计
3.1.1Android数据库概述
Android自带了SQLite数据库,是一款轻型的数据库,是遵守ACID的关联式数据库管理系统,它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了。它能够支持Windows/Linux/Unix等等主流的操作系统,同时能够跟很多程序语言相结合,比如 Tcl、C#、PHP、Java等,还有ODBC接口,同样比起Mysql、PostgreSQL这两款开源世界著名的数据库管理系统来讲,它的处理速度比他们都快。
关于Sqlite的数据类型,你会惊讶:Typelessness(无类型). 对! SQLite是无类型的. 这意味着你可以保存任何类型的数据到你所想要保存的任何表的任何列中, 无论这列声明的数据类型是什么. 对于SQLite来说对字段不指定类型是完全有效的。
3.1.2数据库表详细设计
对系统所需功能需求分析通过了设计确定了系统数据库中表的设计,该系统共有2张表,一张表是电话薄表,另一个是黑名单表,下面为两张表的详细设计。
表contact:
字段名
类型
是否可为空
是否为主键
描述
name
String
否
否
用户名
phone
int
否
是
联系电话
QQ
String
是
否
QQ号码
Email
String
是
否
电子邮箱
address
String
是
否
地址
表blacklist :
字段名
类型
是否可为空
是否为主键
描述
name
String
是
否
用户名
phone
Int
否
是
电话号码
3.2 概念设计图
Android手机通信录管理软件
呼叫联系人
联系人修改
发生信息
联系人删除
联系人列表
联系人快速查找
联系人添加
3-1 个性通信录功能结构图
QQ
Add_people
phone
e-mail
adress
name
3-2 添加联系人实体图
3.3本章小结
本章主要介绍了系统的详细设计。
首先对系统的各个模块的功能进行了详细分析,使读者更清晰的了解各个模块在系统做起的作用,在分析的基础上设计了流程图。然后了分析了数据库中主要的两个表,并简单的对其进行了介绍。总之在详细设计阶段,根本目标是应该明确怎么样具体的实现所要求的系统。经过这个阶段的设计工作,应该得出对目标系统的精确描述,从而在编写代码阶段可以把这个描述直接翻译成设计语言书写的工具。
第四章 系统的详细设计
本章介绍了整个个性通信录系统的主要的界面实现的过程,完成系统主要功能的实现。
4.1 界面布局与设计
4.1.1主界面设计
主界面设计主要实现了联系人列表、快速查找联系人、增加联系人的展示,如下图所示。
4-1通信录主界面
主要代码: <ImageButton
android:id="@+id/imagebutton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/gou"
android:layout_marginLeft="30dip" android:layout_marginTop="30dip"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="联系人列表"
android:textSize="20dip"
android:textColor="#0000ff" android:layout_marginLeft="22dip"/>
<ImageButton
android:id="@+id/imagebutton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/child2"
android:layout_marginLeft="180dip"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="快速查找联系人"
android:textSize="20dip"
android:textColor="#0000ff" android:layout_marginLeft="160dip"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="增加联系人"
android:textSize="20dip"
android:textColor="#0000ff" android:layout_marginLeft="40dip"/>
<ImageButton
android:id="@+id/imagebutton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/zhu"
android:layout_marginLeft="40dip"
android:layout_marginRight="180dip"
android:layout_marginBottom="20dip"/>
</LinearLayout>
"
4.1.2 填写联系人信息设计界面
增加联系人信息界面主要增加联系人姓名、电话、QQ、E-mail、address的信息,如下图所示。
4-2增加联系人具体信息界面
主要代码:<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/name"
android:gravity="left"
android:textSize="10pt"
android:textColor="#0000ff"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dip"/>
<EditText
android:id="@+id/edit_name"
android:layout_width="200dp"
android:layout_height="40dip"
android:background="#a0ffffff"
android:hint="@string/nameedit"
android:textSize="7pt"
android:textColor="#0000ff"
android:layout_marginLeft="20dp"
android:layout_marginRight="30dp"
android:layout_marginTop="5dip"/>
</TableRow>
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/phone"
android:gravity="left"
android:textSize="10pt"
android:textColor="#0000ff"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dip"/>
<EditText
android:digits="1234567890"
android:id="@+id/edit_phone"
android:layout_width="200dp"
android:layout_height="40dip"
android:background="#a0ffffff"
android:hint="@string/phoneedit"
android:textSize="7pt"
android:textColor="#0000ff"
android:layout_marginLeft="20dp"
android:layout_marginRight="30dp"
android:layout_marginTop="5dip"/>
</TableRow>
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/QQ"
android:gravity="left"
android:textSize="10pt"
android:textColor="#0000ff"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dip"/>
<EditText
android:id="@+id/edit_QQ"
android:layout_width="200dp"
android:layout_height="40dip"
android:background="#a0ffffff"
android:hint="@string/QQedit"
android:textSize="7pt"
android:textColor="#0000ff"
android:layout_marginLeft="20dp"
android:layout_marginRight="30dp"
android:layout_marginTop="10dip"/>
</TableRow>
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/mail"
android:gravity="left"
android:textSize="10pt"
android:textColor="#0000ff"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dip"/>
<EditText
android:id="@+id/edit_mail"
android:layout_width="200dp"
android:layout_height="40dip"
android:background="#a0ffffff"
android:hint="@string/mailedit"
android:textSize="7pt"
android:textColor="#0000ff"
android:layout_marginLeft="20dp"
android:layout_marginRight="30dp"
android:layout_marginTop="10dip"/>
</TableRow>
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/address"
android:gravity="left"
android:textSize="10pt"
android:textColor="#0000ff"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dip"/>
<EditText
android:id="@+id/edit_address"
android:layout_width="200dp"
android:layout_height="40dip"
android:background="#a0ffffff"
android:hint="@string/addressedit"
android:textSize="7pt"
android:textColor="#0000ff"
android:layout_marginLeft="20dp"
android:layout_marginRight="30dp"
android:layout_marginTop="10dip"/>
</TableRow>
4.1.3联系人信息展现页面
联系人信息展现界面主要是展现联系人的具体信息,如下图所示。
4-3联系人信息展现图
主要代码:<ImageView
android:id="@+id/imageview1"
android:gravity="left"
android:layout_width="40dp"
android:background="@drawable/tubiao15"
android:layout_height="45dp" android:layout_marginLeft="10dip" android:layout_marginTop="15dip"/>
<TextView
android:id="@+id/name1"
android:gravity="left"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#0000ff"
android:textSize="10pt"
android:text="11111" android:layout_marginTop="10dip"/>
<TextView
android:id="@+id/phone1"
android:gravity="left"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#0000ff"
android:textSize="8pt"
android:text="11111"/>
<ImageView
android:id="@+id/imageview1"
android:gravity="left"
android:background="@drawable/phone"
android:layout_height="30dp" android:layout_width="30dp" android:layout_marginLeft="10dip" android:layout_marginTop="15dip"/>
<ImageView
android:id="@+id/imageview1"
android:gravity="left"
android:background="@drawable/sms"
android:layout_marginLeft="10dip" android:layout_marginTop="15dip" android:layout_width="30dp" android:layout_height="30dp"/>
第五章 调试与部分主要的代码
5.1部分功能模块实现与截图展示
在介绍Address_Book的核心代码前,首先了解一下MainActivity.java()。
(1) MainActivity.java的部分代码:
private ImageButton imagebutton1 = null;
private ImageButton imagebutton2 = null;
private ImageButton imagebutton3 = null;
imagebutton1 = (ImageButton) findViewById(R.id.imagebutton1);
imagebutton2 = (ImageButton) findViewById(R.id.imagebutton2);
imagebutton3 = (ImageButton) findViewById(R.id.imagebutton3);
imagebutton1.setOnClickListener(new MyOnClickListener());
imagebutton2.setOnClickListener(new MyOnClickListener());
imagebutton3.setOnClickListener(new MyOnClickListener());
先声明了用到的组件。从代码中可以看出,MainActivity的主要功能就是通信录的导航栏。
5-1通信录的主界面。
(2) Add_people.java的部分代码:
public void onCreate(Bundle savedInstanceState) {
editName = (EditText) findViewById(R.id.edit_name);
editPhone = (EditText) findViewById(R.id.edit_phone);
editQQ = (EditText) findViewById(R.id.edit_QQ);
editEmail = (EditText) findViewById(R.id.edit_mail);
editAddress = (EditText) findViewById(R.id.edit_address);
buttonAdd = (Button) findViewById(R.id
展开阅读全文