如何检查我的Andr​​oid设备支持w​​ifi直接? [英] How can i check my android device support wifi direct?

查看:130
本文介绍了如何检查我的Andr​​oid设备支持w​​ifi直接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作与Android的wifi直接演示应用。安装在我的设备后,我发现它不按预期工作。

I am working with android wifi direct demo application. After installation in my device I noticed that it is not working as expected.

我很困惑,也需要支持WiFi我的设备支持WiFi直接或特殊的硬件功能直接?我的设备是本地的沃尔顿品牌和API级别16后阅读的android文档我知道,Wi-Fi直添加API级别14并不需要无线接入点。

I am confused, does my device support wifi direct or special hardware feature required for wifi direct? My device is local walton brand and API level 16. After reading android documentation i know that Wi-Fi Direct added in API level 14 doesn't need a wireless access point.

我的另一个问题是,如果在使用wifi的直接两个或多个设备上创建无wifi区的地方相互通信。在总结我的问题,我需要知道,如果我的设备不支持wifi直接我做什么来运行无线演示。先谢谢了。

My other question is if in a place where no wifi zone is created using wifi direct two or more device communicate with each other. in summing my problem, i need to know if my device not support wifi direct what i do to run wifi demo. Thanks in advance.

推荐答案

您应该检查以这种方式,因为有些设备不支持WiFi直接,但仍保持WifiP2pManager code的框架。

you should check in this way, because some devices do not support WiFi direct but still keep the WifiP2pManager code in framework.

private boolean isWifiDirectSupported(Context ctx) {
    PackageManager pm = ctx.getPackageManager();
    FeatureInfo[] features = pm.getSystemAvailableFeatures();
    for (FeatureInfo info : features) {
        if (info != null && info.name != null && info.name.equalsIgnoreCase("android.hardware.wifi.direct")) {
            return true;
        }
    }
    return false;
}

这篇关于如何检查我的Andr​​oid设备支持w​​ifi直接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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