首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 带 Android 应用的桌面蓝牙锁定程序

带 Android 应用的桌面蓝牙锁定程序

  • 资源大小:1.17 MB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: Android java

资 源 简 介

翻译 maninwest@Codeforge 作者:Arkadeep De@CodeProject在创建了一个 USB 锁定程序后,我想应该创建一个蓝牙锁。这样做了以后,我想,为什么不创建一个安卓应用来访问呢?让我们一起来了解如何创建具有安卓应用的蓝牙锁定程序。使用代码让我们来了解代码。首先,您需要找到设备附近的蓝牙设备:InTheHand.Net.Sockets.BluetoothClient bc = new InTheHand.Net.Sockets.BluetoothClient(); InTheHand.Net.Sockets.BluetoothDeviceInfo[] array = bc.DiscoverDevices();在数组中,所有可发现的设备都会列出,现在你可以查看每个设备的 MAC 地址。 for (int i = 0; i < array.Length; i++) { this.address_array[i] = array[i].DeviceAddress; mac = mac + this.address_array[i].ToString(); }完成检查后,检查你的设备的 mac 地址是否在发现的设备中。如果有,锁定计算机。如何锁定计算机:[DllImport("user32.dll", SetLastError = true)] static extern bool LockWorkStation(); bool result = LockWorkStation(); if (result == false) { // An error occurred throw new Win32Exception(Marshal.GetL

文 件 列 表

bluetooth01
.classpath
.project
.settings
AndroidManifest.xml
assets
bin
gen
ic_launcher-web.png
libs
proguard-project.txt
project.properties
res
src
VIP VIP
0.187538s