<?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: Create File object of dropbox excel file link in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/301231#M18240</link>
    <description>&lt;P&gt;The Dropbox Chooser now correctly returns local file links again for ResultType.FILE_CONTENT as of the latest version of the official Dropbox Android app, v114.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Oct 2018 18:54:15 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-10-04T18:54:15Z</dc:date>
    <item>
      <title>Create File object of dropbox excel file link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/297809#M18075</link>
      <description>&lt;P&gt;Hi, I have an app that have already the DbxChooser Class.&lt;/P&gt;&lt;P&gt;I have also this code:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;public void &lt;/SPAN&gt;onActivityResult(&lt;SPAN&gt;int &lt;/SPAN&gt;requestCode, &lt;SPAN&gt;int &lt;/SPAN&gt;resultCode, Intent data) {&lt;BR /&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;(requestCode == &lt;SPAN&gt;DBX_CHOOSER_REQUEST&lt;/SPAN&gt;) {&lt;BR /&gt;        &lt;SPAN&gt;if &lt;/SPAN&gt;(resultCode == Activity.&lt;SPAN&gt;RESULT_OK&lt;/SPAN&gt;) {&lt;BR /&gt;&lt;BR /&gt;            &lt;SPAN&gt;// Handle the result&lt;BR /&gt;&lt;/SPAN&gt;            DbxChooser.Result result = &lt;SPAN&gt;new &lt;/SPAN&gt;DbxChooser.Result(data);&lt;BR /&gt;            Log.&lt;SPAN&gt;d&lt;/SPAN&gt;(&lt;SPAN&gt;"TAG"&lt;/SPAN&gt;, &lt;SPAN&gt;"Link to selected file: " &lt;/SPAN&gt;+ result.getLink());&lt;/PRE&gt;&lt;P&gt;I can see on Logcat the full dropbox link and if I paste it on chrome I can download the file automatically. I want to download this link to a Jave File Obeject because after that I have a method thate receive "File" object (Excel file) and read the excel file. I tried to implement a DownloadFileTask but I could not make it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I download the excel file from a link to a File object ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have also the DropboxClientFactory class ready:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;package &lt;/SPAN&gt;com.tkdcenter.StudentsListFromExcel;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/**&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; * Created by Alex on 18/9/2018.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; */&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;com.dropbox.core.DbxRequestConfig;&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;com.dropbox.core.http.OkHttp3Requestor;&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;com.dropbox.core.v2.DbxClientV2;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public class &lt;/SPAN&gt;DropboxClientFactory {&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;public static &lt;/SPAN&gt;DbxClientV2 getClient(String ACCESS_TOKEN) {&lt;BR /&gt;        &lt;SPAN&gt;// Create Dropbox client&lt;BR /&gt;&lt;/SPAN&gt;        DbxRequestConfig requestConfig = DbxRequestConfig.&lt;SPAN&gt;newBuilder&lt;/SPAN&gt;(&lt;SPAN&gt;"Flashcard Maker"&lt;/SPAN&gt;)&lt;BR /&gt;                .withHttpRequestor(&lt;SPAN&gt;new &lt;/SPAN&gt;OkHttp3Requestor(OkHttp3Requestor.&lt;SPAN&gt;defaultOkHttpClient&lt;/SPAN&gt;()))&lt;BR /&gt;                .build();&lt;BR /&gt;        DbxClientV2 client = &lt;SPAN&gt;new &lt;/SPAN&gt;DbxClientV2(requestConfig, ACCESS_TOKEN);&lt;BR /&gt;        &lt;SPAN&gt;return &lt;/SPAN&gt;client;&lt;BR /&gt;    }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:10:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/297809#M18075</guid>
      <dc:creator>alexsajno</dc:creator>
      <dc:date>2019-05-29T09:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create File object of dropbox excel file link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/297827#M18076</link>
      <description>&lt;P&gt;Since you're getting the link from&amp;nbsp;DbxChooser, you don't necessarilly need to use&amp;nbsp;DbxClientV2 at all.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;DbxClientV2 object is for calling the full&amp;nbsp;Dropbox API, but you can download directly from the&amp;nbsp;Dropbox link instead.&lt;/P&gt;
&lt;P&gt;Exactly how you do so may depend on exactly what &lt;A href="https://www.dropbox.com/developers/chooser#android" target="_self"&gt;kind of link you requested&lt;/A&gt; though.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either&amp;nbsp;DIRECT_LINK or&amp;nbsp;FILE_CONTENT may make sense in this case.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For&amp;nbsp;DIRECT_LINK, issue an HTTPS request to the link, e.g., using&amp;nbsp;&lt;A href="https://developer.android.com/reference/javax/net/ssl/HttpsURLConnection" target="_blank"&gt;HttpsURLConnection&lt;/A&gt;, and save the response. (Note that these links expire after four hours though, so make sure the call succeeded before saving the data.)&lt;/P&gt;
&lt;P&gt;For&amp;nbsp;FILE_CONTENT, which should be a "file:" URL, so you should be able to open it using the &lt;A href="https://developer.android.com/reference/java/io/File" target="_blank"&gt;File&lt;/A&gt; class directly. (Note that this is broken in the current version of the Dropox Android app, but will be fixed in the next version, tentatively planned for release next week.)&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 19:17:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/297827#M18076</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-09-18T19:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create File object of dropbox excel file link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/298080#M18106</link>
      <description>So If I choose FILE_CONTENT. I use the getPath method to get the full URL. What code I shoud use to create File object and download the excel file into it? and how I can follow when the new version is ready to use the code</description>
      <pubDate>Wed, 19 Sep 2018 21:48:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/298080#M18106</guid>
      <dc:creator>alexsajno</dc:creator>
      <dc:date>2018-09-19T21:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create File object of dropbox excel file link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/298196#M18109</link>
      <description>&lt;P&gt;I can't offer help with using &lt;A href="https://developer.android.com/reference/java/io/File" target="_blank"&gt;the Android/Java File class&lt;/A&gt; itself unfortunately, as that's not made by Dropbox. I&amp;nbsp;recommend referring to the documentation for that, or looking for Android samples or asking on a more general&amp;nbsp;programming&amp;nbsp;resource, e.g., StackOverflow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can see when the&amp;nbsp;Dropbox Android app is updated here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://play.google.com/store/apps/details?id=com.dropbox.android&amp;amp;hl=en" target="_blank"&gt;https://play.google.com/store/apps/details?id=com.dropbox.android&amp;amp;hl=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I'll make a note to follow up on this thread when that's done though.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 15:09:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/298196#M18109</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-09-20T15:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create File object of dropbox excel file link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/301231#M18240</link>
      <description>&lt;P&gt;The Dropbox Chooser now correctly returns local file links again for ResultType.FILE_CONTENT as of the latest version of the official Dropbox Android app, v114.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 18:54:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Create-File-object-of-dropbox-excel-file-link/m-p/301231#M18240</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-10-04T18:54:15Z</dc:date>
    </item>
  </channel>
</rss>

