本文主要论述了一种新型的手机文件传输方式:即通过在文件发送端搭建Android微型HTTP服务器的方式进行文件传输。
摘 要:随着移动互联网时代的到来,数以百万计的手机APP被开发出来。极大地丰富了人们的日常生活,让人们之间的沟通变得愈加方便。随之而来的是,下面的这些情况也会经常发生。比方说,当人们需要共享某一份资料时,就有可能受当时环境的限制和干扰,会比较难以进行文件共享交流。当然,虽说能够通过QQ、微信等主流的社交媒体软件进行资料的共享,但是,有的时候对于这些临时性的接触,人们可能并不希望在QQ、微信等软件上互相加为好友。为了解决这一难题,本项目旨在开发一个在手机上可以匿名传递文件的APP,通过使用该软件,可以把Android手机上的文件便捷地与其他手机进行分享,并满足可能出现的各种不便情况。
本应用使用Android Studio为主要开发工具,利用Socket在Android应用端架设微型HTTP服务器来进行文件的传输,合理设计并实现了文件的分类展示功能,使得用户可以按文件的类型对文件进行发送和接收。并且本应用将服务器地址压缩为二维码,通过浏览器扫码即可下载分享的文件,不但简化了用户的操作过程,也让那些并未安装客户端的用户也能够享受被分享的文件。
本文主要介绍了应用开发的背景与现状、开发平台介绍、系统需求、概要设计和详细设计,并对开发过程中出现的多种问题进行总结。根据调试与初步测试,系统能够实现预期的目标。
关键词:Android;文件传输;二维码;Socket;HTTP
Abstract:With the advent of the mobile Internet era, millions of mobile phones APP has been designed. These APP greatly enriched human's daily life, make the communication more convenient. Accompanied by the situation above, following conditions will usually occur. For example, when people need to share a piece of information, there may be restrictions on the environment and interference, and make it more difficult to share files. Of course, we can use QQ, WeChat and other mainstream social software for data sharing, however, sometimes people may not want to add friends on QQ and WeChat for these temporary contact. In order to solve this problem, the project aims to develop a file transferring APP. Using this software, you can easily share files with other mobile phones.
This application uses Android Studio as the main development tool, uses Socket to set up a micro HTTP server for file transfer. This application is designed and implemented reasonable classification of document display function, so that the user can send and receive a file by file type. And the server address will be compressed into two-dimensional code, we can download the shared file through the browse. This design not only simplifies user's operation process, but also makes those who do not install the client users able to enjoy the shared files.
This thesis mainly introduces the background and current situation of this application with the introduction of the development platform, system requirements, outline design and detailed design, at the same time it also summarizes the various problems in the process of development. According to the commissioning and preliminary testing, this project can achieve the desired goal.
Keywords: Android;file transfer;QR code;Socket;HTTP
目 录
摘 要 I
ABSTRACT II
目 录 III
第一章 绪论 1
1.1 背景与现状 1
1.2 目的及意义 1
1.2.1 目的 1
1.2.2 意义 1
1.3 章节安排 2
1.4 本章小结 2
第二章 开发平台及相关技术介绍 3
2.1 开发平台介绍 3
2.1.1 Android Studio介绍 3
2.2 相关技术介绍 3
2.2.1 Android简介 3
2.2.2 Socket简介 3
2.2.3 HTTP协议 4
2.2.4 二维码技术 4
2.3 本章小结 4
第三章 需求分析 5
3.1 功能性需求分析 5