简体   繁体   English

我可以使用python打开android设备的热点吗

[英]Can I turn on the hotspot of an android device using python

I know that android apps can be made in python.我知道 android 应用程序可以用 python 制作。 But I am not able to find anything that tells me how I can use python code to turn on/off the hotspot of an android device.但是我找不到任何告诉我如何使用 python 代码打开/关闭 android 设备热点的信息。 Can anyone help me with that?任何人都可以帮助我吗?

You can refer to this repository, it's using java reflection to do that:您可以参考这个存储库,它使用 java 反射来做到这一点:

https://github.com/google/mobly-bundled-snippets/blob/master/src/main/java/com/google/android/mobly/snippet/bundled/WifiManagerSnippet.java https://github.com/google/mobly-bundled-snippets/blob/master/src/main/java/com/google/android/mobly/snippet/bundled/WifiManagerSnippet.java

The method you need:你需要的方法:

public void wifiEnableSoftAp(@Nullable JSONObject configuration)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM