<?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: Bug on Android Core API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105645#M3110</link>
    <description>&lt;P&gt;Thanks! I'm working on reproducing this, but I can't seem to get the SDK to give me a URL that doesn't have the "https://" at the beginning, which seems to be the important difference, per the exception in your posted log. The URL is built by &lt;CODE&gt;RESTUtility.buildURL&lt;/CODE&gt; in com/dropbox/client2/RESTUtility.java. That only returns either &lt;CODE&gt;null&lt;/CODE&gt; (in case of an &lt;CODE&gt;UnsupportedEncodingException&lt;/CODE&gt;) or:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;return "https://" + host + ":443" + target;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is your &lt;CODE&gt;RESTUtility.buildURL&lt;/CODE&gt; modified by any chance?&lt;/P&gt;

&lt;P&gt;Otherwise, can you try adding some logging to see if/where it's getting modified? E.g., something like this between &lt;CODE&gt;RESTUtility.buildURL&lt;/CODE&gt; and &lt;CODE&gt;Intent intent = new Intent...&lt;/CODE&gt; in &lt;CODE&gt;startWebAuth&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Log.d("TEST", "url: " + url);
Log.d("TEST", "parsed URI: " + Uri.parse(url));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 May 2015 01:19:28 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2015-05-06T01:19:28Z</dc:date>
    <item>
      <title>Bug on Android Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105641#M3106</link>
      <description>&lt;P&gt;When using the Dropbox Core API, if the Dropbox app is not installed, when trying to open the URL to authenticate on the browser the following error happens:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;E/com.dropbox.client2.android.AuthActivity(19192): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=&lt;A href="http://www.dropbox.com/1/connect?locale=...&amp;amp;k=...&amp;amp;n=...&amp;amp;s=&amp;amp;state=oauth2:" rel="nofollow noreferrer" target="_blank"&gt;www.dropbox.com/1/connect?locale=...&amp;amp;k=...&amp;amp;n=...&amp;amp;s=&amp;amp;state=oauth2:&lt;/A&gt;... flg=0x60000000 }&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1672)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1442)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.app.Activity.startActivityForResult(Activity.java:3474)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.app.Activity.startActivityForResult(Activity.java:3435)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.app.Activity.startActivity(Activity.java:3677)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.app.Activity.startActivity(Activity.java:3645)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at com.dropbox.client2.android.AuthActivity.a(SourceFile:623)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at com.dropbox.client2.android.AuthActivity.a(SourceFile:41)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at com.dropbox.client2.android.AuthActivity.run(SourceFile:465)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.os.Handler.handleCallback(Handler.java:733)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.os.Handler.dispatchMessage(Handler.java:95)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.os.Looper.loop(Looper.java:157)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at android.app.ActivityThread.main(ActivityThread.java:5293)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at java.lang.reflect.Method.invokeNative(Native Method)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at java.lang.reflect.Method.invoke(Method.java:515)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at com.android.internal.os.ZygoteInit.run(ZygoteInit.java:1265)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)&lt;BR /&gt;
E/com.dropbox.client2.android.AuthActivity(19192):  at dalvik.system.NativeStart.main(Native Method)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;This can be fixed by adding the following validation on line 620 of AuthActivity.java :: &lt;CODE&gt;startWebAuth(String state)&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if(url != null &amp;amp;&amp;amp; url.startsWith("www.")){
     url = "http://" + url; 
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: This does not happen on every device.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:43:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105641#M3106</guid>
      <dc:creator>Pedro V.5</dc:creator>
      <dc:date>2019-05-29T09:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on Android Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105642#M3107</link>
      <description>&lt;P&gt;Thanks for the report! We'll look into it.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 22:33:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105642#M3107</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-05-05T22:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on Android Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105643#M3108</link>
      <description>&lt;P&gt;Can you let us know more about the devices where you see this? I.e.:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;What version(s) of Android are they running?&lt;/LI&gt;
&lt;LI&gt;What browsers are available, and what versions are they?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 06 May 2015 00:54:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105643#M3108</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-05-06T00:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on Android Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105644#M3109</link>
      <description>&lt;P&gt;One device where it happens:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Samsung SM-P600&lt;/LI&gt;
&lt;LI&gt;Android 4.4.2&lt;/LI&gt;
&lt;LI&gt;Browsers: Chrome, Firefox, Internet (default)&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 06 May 2015 00:55:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105644#M3109</guid>
      <dc:creator>Pedro V.5</dc:creator>
      <dc:date>2015-05-06T00:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on Android Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105645#M3110</link>
      <description>&lt;P&gt;Thanks! I'm working on reproducing this, but I can't seem to get the SDK to give me a URL that doesn't have the "https://" at the beginning, which seems to be the important difference, per the exception in your posted log. The URL is built by &lt;CODE&gt;RESTUtility.buildURL&lt;/CODE&gt; in com/dropbox/client2/RESTUtility.java. That only returns either &lt;CODE&gt;null&lt;/CODE&gt; (in case of an &lt;CODE&gt;UnsupportedEncodingException&lt;/CODE&gt;) or:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;return "https://" + host + ":443" + target;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is your &lt;CODE&gt;RESTUtility.buildURL&lt;/CODE&gt; modified by any chance?&lt;/P&gt;

&lt;P&gt;Otherwise, can you try adding some logging to see if/where it's getting modified? E.g., something like this between &lt;CODE&gt;RESTUtility.buildURL&lt;/CODE&gt; and &lt;CODE&gt;Intent intent = new Intent...&lt;/CODE&gt; in &lt;CODE&gt;startWebAuth&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Log.d("TEST", "url: " + url);
Log.d("TEST", "parsed URI: " + Uri.parse(url));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 May 2015 01:19:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105645#M3110</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-05-06T01:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bug on Android Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105646#M3111</link>
      <description>&lt;P&gt;Sorry, you're absolutely right. This was our fault. &lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 18:29:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bug-on-Android-Core-API/m-p/105646#M3111</guid>
      <dc:creator>Pedro V.5</dc:creator>
      <dc:date>2015-05-06T18:29:46Z</dc:date>
    </item>
  </channel>
</rss>

