2

アクセスポイントを作成できるアプリケーションを作成したいと思います。Androidのドキュメントを見ると、WifiManagerクラス[1]があります。

/**
     * Start AccessPoint mode with the specified
     * configuration. If the radio is already running in
     * AP mode, update the new configuration
     * Note that starting in access point mode disables station
     * mode operation
     * @param wifiConfig SSID, security and channel details as
     *        part of WifiConfiguration
     * @return {@code true} if the operation succeeds, {@code false} otherwise
     *
     * @hide Dont open up yet
     */
    public boolean setWifiApEnabled(WifiConfiguration wifiConfig, boolean enabled) {
        try {
            return mService.setWifiApEnabled(wifiConfig, enabled);
        } catch (RemoteException e) {
            return false;
        }
    }

しかし、何らかの理由でそれは隠されています。WifiManagerと同じことをする方法はありますか?どういうわけかこのメソッドにアクセスできますか?

4

1 に答える 1

3

アクセスポイントを使用できます:

WifiApControl apControl = WifiApControl.getInstance(context);

apControl.enable();
于 2015-09-10T21:40:48.040 に答える