APP下载

基于Wi-Fi Direct的安卓签到系统的应用

2021-11-08王静怡

电脑知识与技术 2021年27期

王静怡

摘要:目前部分高校使用指纹点名系统、人脸识别系统这类成本较高的考勤系统,设备多且操作烦琐。该套软件的主要功能是将学生端先通过Wi-Fi Direct与教师端连接起来,然后将学生信息发送给教师端完成签到。学生端与教师端通信通过Socket套接字进行,定位方式使用百度定位SDK(软件开发工具包)服务,将SQLite数据库中的学生表的操作封装成一个模块传给教师端使用。同时增加多重校验功能,填写每位同学的位置信息、填写每部手机的MAC地址,使每部手机只允许一名同学参与点名。该套软件实现了课堂点名的主要功能,并能提高课堂点名的效率与可靠性。

关键词:课堂点名;Android;Wi-Fi Direct;百度定位;SQLite数据库

中图分类号:TP311      文献标识码:A

文章编号:1009-3044(2021)27-0023-05

Abstract: Currently, some colleges and universities use fingerprint attendance systems and face recognition systems which are expensive, and these ways need more equipment and complicated operation. This application aims to achieve the function of students roll call in a class by connecting students smartphones with teachers using Wi-Fi Direct. Then, students send the information which contains the students ID and name to teachers smartphone for roll call. The method of communication between the students smartphone and teachers implemented by Socket. And the location service is implemented using BDLocation SDK (Software Development Kit). Finally, this app packs the student table in the SQLite database into a module and sends it to the teachers smartphone. At the same time, this app supports multiple checking methods, such as filling in each student's location information and requesting the MAC address of each students smartphone, so that each phone only allows one student to participate in the roll call. This app implements the main functions of class roll call and improves the efficiency and reliability of roll call in the class.

Key words: Roll Call; Android; Wi-Fi Direct; Baidu Location; SQLite Database

1 背景

在安卓智能手机的逐渐普及和移动通信技术的日渐成熟下,手机点名软件能够很好地解决目前高校学生考勤的漏洞并提高考勤效率[1]。本系统的创新点在于依靠Wi-Fi Direct通信技术来实现学生端和教师端的连接,将百度GPS定位加入应用中来判断学生端点名时是否在教室内,通过填写每位同学的位置信息和每部手机的MAC地址,增加多重校验功能避免代替签到现象的发生。采用SQLite数据库管理模块能保证数据不会轻易丢失,方便教师及时查看学生出勤情况。手机点名软件是课堂考勤方法的一次创新尝试,对高校信息化建设的实施具有重要意义。

2 相关技术简介

2.1 Wi-Fi Direct技术

Wi-Fi Direct标准是指允许无线网络中的设备无须通过无线路由器即可相互连接。Wi-Fi Direct设备是支持对等连接的设备,这种设备既支持基础设施网络,也支持P2P连接[2]。Wi-Fi Direct可以支持一對一直连,也可以实现多台设备同时连接,并且不同标准的Wi-Fi设备之间也可以直接互联[3]。

Wi-Fi Direct设备的特点包括以下几点[4]:

1)移动性与便携性:Wi-Fi Direct设备不需要Wi-Fi 路由器或接入点,能够随时随地实现互相连接。

2)易用性:Wi-Fi Direct设备发现(Device Discovery)与服务发现(Service Discovery)功能帮助用户确定可用的设备与服务,然后建立连接。

3)简单而安全的连接:Wi-Fi Direct设备采用Wi-Fi Protected Setup?,故而简化了在设备之间创建安全连接的过程。用户可以按下任一设备上的按钮,也可以输入PIN码(即设备所显示的PIN码),轻松创建安全连接。

2.2 百度地图Android定位SDK