当前位置:编程学习 > wap >>

WifiManager.startScanActive()没有定义?(Android Wifi Scan的间隔可以控制吗)

--------------------编程问答-------------------- 自己顶一个先。。 --------------------编程问答-------------------- 哎呀,好神奇,刚才在Developer官网上居然没有startScanActive(),为什么我的文档上有呢,哇。。盗版的?
--------------------编程问答-------------------- 。。。。。。。。。无人问津。。 --------------------编程问答-------------------- 想问下你用的什么机型?500ms。我这里有的机型1-3秒采集1次都有可能。。
另外你找到什么方法可以控制扫描间隔了么? --------------------编程问答--------------------     /**
     * Request a scan for access points. Returns immediately. The availability
     * of the results is made known later by means of an asynchronous event sent
     * on completion of the scan.
     * @return {@code true} if the operation succeeded, i.e., the scan was initiated
     */
    public boolean startScan() {
        try {
            mService.startScan(false);
            return true;
        } catch (RemoteException e) {
            return false;
        }
    }

    /**
     * Request a scan for access points. Returns immediately. The availability
     * of the results is made known later by means of an asynchronous event sent
     * on completion of the scan.
     * This is a variant of startScan that forces an active scan, even if passive
     * scans are the current default
     * @return {@code true} if the operation succeeded, i.e., the scan was initiated
     *
     * @hide
     */
    public boolean startScanActive() {
        try {
            mService.startScan(true);
            return true;
        } catch (RemoteException e) {
            return false;
        }
    } --------------------编程问答--------------------
引用 4 楼 xlx890121 的回复:
想问下你用的什么机型?500ms。我这里有的机型1-3秒采集1次都有可能。。
另外你找到什么方法可以控制扫描间隔了么?

同问,我也想缩短扫描间隔。。。谁知道如何做?
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,