<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Migration from Sync API v1 to Core API v2 in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179011#M7223</link>
    <description>&lt;P&gt;There are standard timeouts, but you can also set custom ones using&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/com/dropbox/core/http/StandardHttpRequestor.Config.Builder.html" target="_blank" rel="nofollow noreferrer"&gt;StandardHttpRequestor.Config.Builder&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2016 00:10:11 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-08-11T00:10:11Z</dc:date>
    <item>
      <title>Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179006#M7218</link>
      <description>&lt;P class="p1"&gt;Hi&lt;/P&gt;
&lt;P class="p2"&gt;I am migrating my existing code from Sync API v1 to Core API v2. There is one issue I am facing. There was a call in Sync API v2 to check if the cached file is latest or not:&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;DbxFile mFile = &lt;SPAN class="s1"&gt;&lt;STRONG&gt;dbxFs&lt;/STRONG&gt;&lt;/SPAN&gt;.open(testPath);&lt;BR /&gt; &lt;SPAN class="s2"&gt;&lt;STRONG&gt;boolean &lt;/STRONG&gt;&lt;/SPAN&gt;latest;&lt;BR /&gt; latest = mFile.getSyncStatus().&lt;SPAN class="s1"&gt;&lt;STRONG&gt;isLatest&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;Then on the basis of this ‘latest’ variable, I performed certain tasks.&lt;/P&gt;
&lt;P class="p1"&gt;In API v2, I couldn’t find any DbxFile class. The only closest thing I could find is getRev() of FileMetadata.&lt;/P&gt;
&lt;P class="p1"&gt;How can I use getRev() to find if I have the latest file? Is there any other way to do so?&lt;/P&gt;
&lt;P class="p1"&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:31:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179006#M7218</guid>
      <dc:creator>Bhupesh K.</dc:creator>
      <dc:date>2019-05-29T09:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179007#M7219</link>
      <description>&lt;P&gt;The API v2 SDKs don't provide caching layers for you like the Sync SDKs did, but if you are caching file content locally like that, the rev value you mentioned can be used to keep track of changes.&amp;nbsp;That is, when you store a copy of a file locally, store the rev value for that copy as well. When you see the remote rev value as different from the local one, you know that the file changed and you should download the new version.&lt;/P&gt;
&lt;P&gt;For example, when using &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolderContinue-java.lang.String-" target="_blank" rel="nofollow noreferrer"&gt;listFolderContinue&lt;/A&gt;, you'll get a list of Metadata entries, where you can see if there's a new version of a file you cached.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 00:46:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179007#M7219</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-07-26T00:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179008#M7220</link>
      <description>&lt;P&gt;Ok, I have been able to implement this. I store the revision number of the cached file and compare it with the String returned by getRev(). Now, I have another question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose I want to login with another Dropbox account. Sync API had unlink() function to logout from current Dropbox account. How can I implement this in Core API v2? I didn't find a similar&amp;nbsp;function.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Aug 2016 14:55:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179008#M7220</guid>
      <dc:creator>Bhupesh K.</dc:creator>
      <dc:date>2016-08-06T14:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179009#M7221</link>
      <description>&lt;P&gt;The API v2 Java SDK doesn't handle storing the access token for you (like the Sync SDK did), so this is under your control. If you want to "unlink" the user, you can just throw away the access token you have stored for the user. You can additionally revoke the token using the&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/com/dropbox/core/v2/auth/DbxUserAuthRequests.html#tokenRevoke--" target="_blank" rel="nofollow noreferrer"&gt;tokenRevoke&lt;/A&gt; method.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 00:14:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179009#M7221</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-08-09T00:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179010#M7222</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Thanks for this. I have another doubt. Is there any 'timeout' variable which can be set for&amp;nbsp;API v2 functions like&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;mDbxClient.files().download() or&lt;/PRE&gt;
&lt;PRE&gt;mDbxClient.files().uploadBuilder etc.&lt;/PRE&gt;
&lt;P&gt;If user&amp;nbsp;Internet is slow and&amp;nbsp;he is downloading/uploading a file, I don't want him to keep waiting. There should be some message displayed to him after 'timeout' occurs. Please help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Varun&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 18:43:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179010#M7222</guid>
      <dc:creator>Bhupesh K.</dc:creator>
      <dc:date>2016-08-10T18:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179011#M7223</link>
      <description>&lt;P&gt;There are standard timeouts, but you can also set custom ones using&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/com/dropbox/core/http/StandardHttpRequestor.Config.Builder.html" target="_blank" rel="nofollow noreferrer"&gt;StandardHttpRequestor.Config.Builder&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 00:10:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179011#M7223</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-08-11T00:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179012#M7224</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I am facing another issue while uploading a file on Dropbox. I have written code below for uploading a file.&lt;/P&gt;
&lt;PRE&gt;InputStream inputStream = null;&lt;BR /&gt;FileMetadata obj = null;&lt;BR /&gt;try {&lt;BR /&gt;    inputStream = new FileInputStream(srcFile);&lt;BR /&gt;    obj = mDbxClient.files().uploadBuilder(remoteFolderPath + "/" + remoteFileName)&lt;BR /&gt;            .withMode(WriteMode.OVERWRITE)&lt;BR /&gt;            .uploadAndFinish(inputStream);&lt;BR /&gt;} catch (DbxException | IOException e) {&lt;BR /&gt;    obj = null;&lt;BR /&gt;    mException = e;&lt;BR /&gt;} finally {&lt;BR /&gt;    if (inputStream != null)&lt;BR /&gt;        try {&lt;BR /&gt;            inputStream.close();&lt;BR /&gt;        } catch (IOException e) {&lt;BR /&gt;            e.printStackTrace();&lt;BR /&gt;        }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;This code returns a NetworkIOException when Internet is off. While uploading a file with Internet off, Sync API v1 never threw any exception. When Internet was turned on, it automatically uploaded the file. Can I have such behaviour with Core API v2 also? How can I implement this?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:21:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179012#M7224</guid>
      <dc:creator>Bhupesh K.</dc:creator>
      <dc:date>2016-08-19T15:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179013#M7225</link>
      <description>&lt;P&gt;The Sync SDK did offer offline caching and queuing, but the API v2 SDKs do not. That being the case, if you need this functionality, you'll have to implement it in your application's code. E.g., if you get such an exception when attempting the upload, save the file to upload in a queue, and have your app try again when it detects that Internet access has returned.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 22:00:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179013#M7225</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-08-19T22:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Migration from Sync API v1 to Core API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179014#M7226</link>
      <description>&lt;P&gt;As an indication of how complex all that Sync API caching was, my new Android app used to use Sync and is now using Core API v2.&amp;nbsp; I dropped the caching functionality and my app now only offers user-directed upload and download of its local document files.&amp;nbsp; My code is about the same in length.&amp;nbsp; But the Android APK file is&lt;STRONG&gt; half the size&lt;/STRONG&gt; of what it was when I was linking with the Dropbox Sync libraries.&amp;nbsp;&amp;nbsp; So that caching function was huge, and very non-trivial.&amp;nbsp; To really do background syncing and caching well is way beyond what most application developers want to get into.&amp;nbsp; Fortunately for my app, that functionality was not essential, and I think the new functionality will actually be more deterministic and easier for my users to understand.&amp;nbsp; But there may be others who are not so lucky.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Aug 2016 01:58:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Migration-from-Sync-API-v1-to-Core-API-v2/m-p/179014#M7226</guid>
      <dc:creator>Robert S.138</dc:creator>
      <dc:date>2016-08-20T01:58:22Z</dc:date>
    </item>
  </channel>
</rss>

