面向Android移动端网络工具的设计与开发

2017-01-13 08:50:21郭晓军薛恒
中国新通信 2016年22期

郭晓军+薛恒

【摘要】网络工具是进行有效网络管理的必要手段。针对当前移动智能设备端网络工具研究不足问题,本文以Ping 、端口扫描和局域网唤醒三个典型网络工具为例,选取Android Studio(AS)作为开发环境,指出其搭建过程关键步骤,并给出了三个工具开发过程中的要点和核心代码,为今后此领域相关研究提供一定借鉴。

【关键词】 网络管理 Android Studio Ping 端口扫描Network Tools Design and Development for Android-based Mobile Device

Guo Xiaojun1,2, Xue Heng1,2

(1 School of Information Engineering , Xizang Minzu University, Xianyang Shaanxi, 712082, China)

(2 XiZang Key Laboratory of Optical Information Processing and Visualization Technology, Xianyang Shaanxi, 712082, China)

Abstract:Network tools are the necessary means to do network management effectively. For the lack of current research about network tools on mobile intelligent device, this paper takes three typical network tools: ping, port scan and wake on LAN, as examples, chooses Android Studio as development environment and indicates critical steps during its setup process. Also the key notes and the core codes of these three network tools development process are presented, which can provide definite reference value for related research in this topic.

Key words:Network management; Android Studio; Ping; Port Scan;

一、引言

智能手机、平板等设备对移动网络的连通性、稳定性及健壮性方面要求较高。因此研究与开发基于移动智能终端的网络工具是很有必要的。

本文以智能移动端操作系统Android为例,利用搭建的AS开发环境,设计和实现了三个网络工具:Ping、端口扫描(PScan)和远程唤醒工具(Won),对基于移动智能终端网络工具开发过程进行了初步尝试。

二、Android Studio搭建关键步骤

AS是Google在2013年5月16日的I/O大会上发布的 Android应用程序基础开发环境。此处以AS 2.0版本为例,给出其在Windows 7(64bit)上搭建过程中的关键步骤。

(1) Java开发环境配置。

在下载JDK后就可以双击直接安装,然后右击“计算机”选择“系统属性”中的“环境变量”,选择“系统变量”中的“Path”进行编辑,添加JDK安装路径(如C:\Program Files\Java\jdk1.7.0_79),以完成Java开发环境配置。

(2)AS中SDK配置。

AS 2.0可从官网上下载,其安装过程与普通Windows应用程序安装过程类似。在安装完成后,可打开“tool”?Android? “SDK Manager”? “Lauch Standalone SDK Manager”, 打开“Android SDK Manager”对话框,可针对不同版本的Android系统来安装不同的SDK工具包。

三、典型网络工具开发要点

本文此处选取三个典型代表工具:Ping命令、端口扫描PScan及局域网唤醒工具WoL,着重阐述它们在AS中开发过程的要点。

3.1 Ping

Ping工具……

登录APP查看全文