Android4.4版本源码变化

本文介绍了TDLS(Tunneled Direct Link Setup)无线标准,该标准允许设备通过WiFi网络进行点对点直连,节省带宽并提高连接质量。文章详细解释了如何通过设置特定IP地址或MAC地址启用或禁用TDLS,并提供了与之相关的API介绍。

一,WifiManager

  新增:

 1 public void setTdlsEnabled (InetAddress remoteIPAddress, boolean enable)
 2     
 3 Enable/Disable TDLS on a specific local route.
 4 
 5 TDLS enables two wireless endpoints to talk to each other directly without going through the access point that is managing the local network. It saves bandwidth and improves quality of the link.
 6 
 7 This API enables/disables the option of using TDLS. If enabled, the underlying hardware is free to use TDLS or a hop through the access point. If disabled, existing TDLS session is torn down and hardware is restricted to use access point for transferring wireless packets. Default value for all routes is 'disabled', meaning restricted to use access point for transferring packets.
 8 
 9 Parameters
10 remoteIPAddress    IP address of the endpoint to setup TDLS with
11 enable    true = setup and false = tear down TDLS
public void setTdlsEnabledWithMacAddress (String remoteMacAddress, boolean enable)

Similar to setTdlsEnabled(InetAddress, boolean), except this version allows you to specify remote endpoint with a MAC address.

Parameters
remoteMacAddress    MAC address of the remote endpoint such as 00:00:0c:9f:f2:ab
enable    true = setup and false = tear down TDLS

 

  变更:

public DhcpInfo getDhcpInfo ()

Return the DHCP-assigned addresses from the last successful DHCP request, if any.

Returns
the DHCP information

/*Change from deprecated to undeprecated.*/

 

TDLS简介

日前WiFi联盟推出了名为TDLS(Tunneled Direct Link Setup,通道直接链路建立)的无线标准,这项标准允许两款设备通过WiFi网络进行点对点直连,与早起提倡的WiFi Direct相似,不过功能则更加完善。

 

前后版源码版本差异查看:frameworks\base\docs\html\sdk\api_diff\19\changes

 转载请注明出处:http://www.cnblogs.com/Miami/p/4380381.html

转载于:https://www.cnblogs.com/Miami/p/4380381.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值