难道Android的磨损支持直接访问互联网?互联网、磨损、直接、Android

2023-09-12 10:10:27 作者:精神病人思维广

作为一个Android开发的磨损, 我们可以直接通过HTTP请求访问网络? 在我的情况,我想送一个HTTP请求来获取雅虎财经API库存数据,但总是失败,

As an android wear developer, Can we directly access network through http request ? In my case, I want to send a http request to get Yahoo Financial API stock data, but it always fails,

同样条件在计算器 Does Android Wear支持的HttpURLConnection - 让EOFException类 Direct在Android互联网连接穿?

Same conditions In stackoverflow Does Android Wear support HttpURLConnection - getting EOFException Direct internet connection on Android Wear?

但在最新的Andr​​oid 5.1.1更新显示支持WiFi功能 的http://officialandroid.blogspot.tw/2015/04/android-wear-wear-what-you-want-get.html

But in latest Android 5.1.1 Update shows "Wifi Support feature" http://officialandroid.blogspot.tw/2015/04/android-wear-wear-what-you-want-get.html

这意味着,在Android的WiFi功能穿只为同步数据电话之间的磨损,或者我们可以对无线网络做更多的事情?

It means that Wifi feature in Android Wear just for "sync data" between phone and wear, or we can do more things on wifi ?

感谢

推荐答案

无线网络意味着你可以使用的磨损数据层的API (MessageApi,DataApi,ChannelApi等),当您的手机和穿戴设备不直接通过蓝牙连接。

WiFi means that you'll be able to use the Wear Data Layer APIs (MessageApi, DataApi, ChannelApi, etc) when your phone and Wear device are not directly connected via Bluetooth.

编辑:的同时附着在无线网络,您会能够做到直接HTTP请求 - 但要注意一旦重新连接到蓝牙,这种能力被删除,以便确保如果你利用这一点额外的功能,可以确保您的应用程序同样适用于这两种情况下(或者有相应的应变行为/给用户的警告)。

While attached on wifi, you will be able to do direct HTTP requests - however do note that once reconnected to Bluetooth, that ability is removed so ensure that if you do take advantage of that additional functionality, you ensure your app works equally well in both situations (or has the appropriate fallback behavior/warnings to the user).

 
精彩推荐
图片推荐