Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
512 views
in Technique[技术] by (71.8m points)

Does Android Wear support direct access to the Internet?

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,

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

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

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

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

Edit: 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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...