shokai / Android-VoiceTweet

Twitter Client for AndroidWear
MIT License
0 stars 1 forks source link

tweet from wear #9

Closed shokai closed 9 years ago

shokai commented 9 years ago

current flow

shokai commented 9 years ago

Handheld and Wear both uses TwitterUtil.java and TwitterConfig.java so share them by library-project.

shokai commented 9 years ago

cannot connect twitter API

call Twitter.updateStatus(String) then

on Wear (emulator)

04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ Unable to resolve host "api.twitter.com": No address associated with hostname
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ Relevant discussions can be found on the Internet at:
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ http://www.google.co.jp/search?q=2fc5b7cb or
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ http://www.google.co.jp/search?q=0e20763e
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ TwitterException{exceptionCode=[2fc5b7cb-0e20763e 2fc5b7cb-0e207614 2fc5b7cb-0e207614], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=4.0.3}
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:178)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at twitter4j.HttpClientBase.request(HttpClientBase.java:53)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at twitter4j.HttpClientBase.post(HttpClientBase.java:82)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at twitter4j.TwitterImpl.post(TwitterImpl.java:1598)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at twitter4j.TwitterImpl.updateStatus(TwitterImpl.java:205)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at org.shokai.voicetweet.WearMainActivity$3.doInBackground(WearMainActivity.java:128)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at org.shokai.voicetweet.WearMainActivity$3.doInBackground(WearMainActivity.java:123)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at android.os.AsyncTask$2.call(AsyncTask.java:288)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at java.util.concurrent.FutureTask.run(FutureTask.java:237)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at java.lang.Thread.run(Thread.java:818)
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ Caused by: java.net.UnknownHostException: Unable to resolve host "api.twitter.com": No address associated with hostname
04-06 14:01:25.048    1884-1906/org.shokai.voicetweet W/System.err﹕ at java.net.InetAddress.lookupHostByName(InetAddress.java:457)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at java.net.InetAddress.getAllByName(InetAddress.java:215)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.HostResolver$1.getAllByName(HostResolver.java:29)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:232)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:124)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:272)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:136)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ ... 12 more
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at libcore.io.Posix.android_getaddrinfo(Native Method)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ at java.net.InetAddress.lookupHostByName(InetAddress.java:438)
04-06 14:01:25.049    1884-1906/org.shokai.voicetweet W/System.err﹕ ... 25 more

on Wear (moto360)

04-06 13:16:40.651    7969-8017/org.shokai.voicetweet W/System.err﹕ failed to connect to api.twitter.com/199.16.158.169 (port 443) after 20000ms
04-06 13:16:40.651    7969-8017/org.shokai.voicetweet W/System.err﹕ Relevant discussions can be found on the Internet at:
04-06 13:16:40.652    7969-8017/org.shokai.voicetweet W/System.err﹕ http://www.google.co.jp/search?q=2fc5b7cb or
04-06 13:16:40.652    7969-8017/org.shokai.voicetweet W/System.err﹕ http://www.google.co.jp/search?q=0e20763e
04-06 13:16:40.657    7969-8017/org.shokai.voicetweet W/System.err﹕ TwitterException{exceptionCode=[2fc5b7cb-0e20763e 2fc5b7cb-0e207614], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=4.0.3}
04-06 13:16:40.657    7969-8017/org.shokai.voicetweet W/System.err﹕ at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:178)
04-06 13:16:40.657    7969-8017/org.shokai.voicetweet W/System.err﹕ at twitter4j.HttpClientBase.request(HttpClientBase.java:53)
04-06 13:16:40.657    7969-8017/org.shokai.voicetweet W/System.err﹕ at twitter4j.HttpClientBase.post(HttpClientBase.java:82)
04-06 13:16:40.657    7969-8017/org.shokai.voicetweet W/System.err﹕ at twitter4j.TwitterImpl.post(TwitterImpl.java:1598)
04-06 13:16:40.657    7969-8017/org.shokai.voicetweet W/System.err﹕ at twitter4j.TwitterImpl.updateStatus(TwitterImpl.java:205)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at org.shokai.voicetweet.WearMainActivity$3.doInBackground(WearMainActivity.java:128)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at org.shokai.voicetweet.WearMainActivity$3.doInBackground(WearMainActivity.java:123)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at android.os.AsyncTask$2.call(AsyncTask.java:288)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at java.util.concurrent.FutureTask.run(FutureTask.java:237)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at java.lang.Thread.run(Thread.java:818)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ Caused by: java.net.SocketTimeoutException: failed to connect to api.twitter.com/199.16.158.169 (port 443) after 20000ms
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at libcore.io.IoBridge.connect(IoBridge.java:122)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at java.net.Socket.connect(Socket.java:882)
04-06 13:16:40.658    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.Platform.connectSocket(Platform.java:139)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.Connection.connect(Connection.java:152)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
04-06 13:16:40.659    7969-8017/org.shokai.voicetweet W/System.err﹕ at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:136)
shokai commented 9 years ago

Wear cannot use HTTP