Does Android Wear support HttpURLConnection - getting EOFException

前端 未结 1 462
难免孤独
难免孤独 2020-12-31 14:22

I am wondering if we can access the network through HttpURLConnection from Android Wear?

I tried using HttpURLConnection inside W

相关标签:
1条回答
  • 2020-12-31 14:56

    Unfortunately, no.

    Android Wear applications cannot directly access the Internet. They must communicate with their corresponding handheld app (either via MessageApi or DataApi) and request that it executes whatever HTTP requests you need.


    EDIT: Android Wear 2.0, now in beta, supports network requests, so HttpURLConnection should work there.

    0 讨论(0)
提交回复
热议问题