Android:使用Dropbox API了解我的Dropbox是否有变化

时间:2016-08-30 15:33:44

标签: java android notifications dropbox-api

我想知道我的Dropbox是否有变化。基本上这是我的策略(我正在使用https://www.dropbox.com/developers-v1/core):

  • 调用delta / last_cursor获取游标
  • 使用此光标作为参数

    调用long_poll_data
    08-30 17:11:57.706 31971-32681/com.example.colombop.ble W/System.err: com.dropbox.client2.exception.DropboxIOException: java.net.SocketTimeoutException: Read timed out
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at com.dropbox.client2.RESTUtility.execute(Unknown Source)
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at com.dropbox.client2.RESTUtility.execute(Unknown Source)
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at com.dropbox.client2.RESTUtility.streamRequest(Unknown Source)
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at com.dropbox.client2.RESTUtility.request(Unknown Source)
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at com.example.colombop.ble.NotificationService$2.run(NotificationService.java:161)
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at java.lang.Thread.run(Thread.java:818)
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err: Caused by: java.net.SocketTimeoutException: Read timed out
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:705)
    08-30 17:11:57.707 31971-32681/com.example.colombop.ble W/System.err:     at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:108)
    08-30 17:11:57.708 31971-32681/com.example.colombop.ble W/System.err:     at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:196)
    08-30 17:11:57.708 31971-32681/com.example.colombop.ble W/System.err:     at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:88)
    08-30 17:11:57.708 31971-32681/com.example.colombop.ble W/System.err:     at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:179)
    08-30 17:11:57.708 31971-32681/com.example.colombop.ble W/System.err:     at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:185)
    08-30 17:11:57.708 31971-32681/com.example.colombop.ble W/System.err:     at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:240)
    08-30 17:11:57.708 31971-32681/com.example.colombop.ble W/System.err:     at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:264)
    

重点是:我得到了第一个电话的响应。 但是对于第二个我得到了这个答案:

CAL_DT

有人有建议吗?

0 个答案:

没有答案