如何在Glass上禁用WiFi进行测试? [英] How to disable WiFi on Glass for testing?

查看:124
本文介绍了如何在Glass上禁用WiFi进行测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为Google Glass开发一个接收器,它将检测Glass的WiFi状态,并根据该状态向用户显示一些信息。

I want to develop a receiver for Google Glass which will detect the WiFi state of Glass and depending on that state show some information to user.

接收器将监听为 android.net.wifi.WIFI_STATE_CHANGED 付费,这样我可以赶上该事件,然后检查互联网状态。它不仅可以检测互联网的可用性,还可以显示在从任何Glass应用程序ping任何特定IP地址时Glass是否超时。

The receiver will listen for android.net.wifi.WIFI_STATE_CHANGED so that I can catch the event and after that check the status of the internet. It will not only detect the internet availability but will also show if Glass is timing out when pinging any specific IP address from any apps of glass.

我已经在另一个Android设备,并且运行正常。但是现在我想在Glass上测试该应用程序。为了测试,我想禁用WiFi;但是,Glass仅在设置中显示用于忘记当前WiFi网络并连接到附近网络的选项。

I have tested the receiver on another Android device and it's working fine. But now I want to test the app on Glass. In order to test, I want to disable WiFi; however, Glass only shows options in settings for forgetting the current WiFi network and connecting to a nearby network.

如何临时禁用Glass上的WiFi?

How can I disable WiFi on Glass temporarily?

推荐答案

在玻璃的默认设置下,无法禁用WiFi。要执行此操作,您必须遵循一些说明并安装android默认启动器和设置,以便您可以将设置UI用作android设备并完成其余工作。

From default settings of glass its not possible to disable WiFi. To do the things you have to follow some instructions and install android default launcher and settings so that you can get the settings UI as your android device and do the rest of the desire works.

我在这里描述整个过程:

I am describing the whole process here :


  1. 首先您必须下载这两个apk。

  1. At first you have to download these two apk.

  • Settings.apk - http://goo.gl/EqV8u
  • Launcher2.apk - http://goo.gl/ytfSn

之后,您必须安装这些亚行向您的杯子中添加了两个应用程序:

After that you have to install these two apps into your glass by ADB :

1. adb install Settings.apk          2. adb install Launcher2.apk    


请注意不要选中用作默认值框,否则,在卸载Launcher2.apk之前,您将无法访问Glass设置。

完成安装后,转到设置并选择启动器。选择android默认启动器后,您将获得设置UI,就像您的android设备一样。现在,您可以做任何想做的事情,例如WiFi启用/禁用,Bluetooth启用/禁用等。但是有些问题无法解决,例如Bluetooth共享,数据使用,飞行模式和其他功能。

After complete installing go to your settings and select launcher. After selecting android default launcher you will get the setting UI as like as your android device. Now you can do whatever you want like WiFi enable/disable, Bluetooth enable/disable and etc. But there have some issues which not working like Bluetooth Tethering, Data Usage , Airplane Mode and some more features.

详细介绍了使用设置和启动器且无法使用功能的过程。

如果要首先卸载已安装的应用程序,请使用以下脚本查看应用程序包名称并从设备中删除该应用程序:

If you want to uninstall the installed app at first see your app packages name and delete the app from the devices using below script :

adb shell pm list packages [see all of your installed app list]

abd shell pm uninstall -k com.packagename [your app by specific package name]

完成上述脚本后,您将获得以前的玻璃设置。

After above script you will get your previous glass settings.

以下是出色的视频,其中以很好的方式描述了所有这些过程。

Here is the excellent video where all these process has been described in nice way.

取消保修:黑客眼镜

这篇关于如何在Glass上禁用WiFi进行测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆