<?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 How to switch from one account to another java SDK V2 (Android)? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-switch-from-one-account-to-another-java-SDK-V2-Android/m-p/229463#M12461</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is there a way to switch from one account to another without revoking the accessToken. Since I migrated to V2 I can not manage several accounts with my app.&lt;BR /&gt;I always come back to the same account after:&lt;/P&gt;&lt;PRE&gt;//previously DbxClientV2 created
dropBoxService = null;
//previously String accessToken created
dropboxAccessToken = null;
//start to create a new one
Auth.startOAuth2Authentication(getActivity(), APP_KEY);
//finaly in on resume method:
dropboxAccessToken = Auth.getOAuth2Token();
                
DropboxClientFactory.init(dropboxAccessToken);
dropBoxService = DropboxClientFactory.getClient();
new GetCurrentAccountTask(dropBoxService, new GetCurrentAccountTask.Callback() {
                    @Override
                    public void onComplete(final FullAccount result) {

                        Log.i("DROPBOX",String.valueOf(result.getEmail()));
                        //i obtain the same previously created email and not a new one! Why?
                        
                    }               &lt;/PRE&gt;&lt;P&gt;SolidExplorer for example switches from one account to another without losing the accessToken. I can not find the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:21:14 GMT</pubDate>
    <dc:creator>Aristide</dc:creator>
    <dc:date>2019-05-29T09:21:14Z</dc:date>
    <item>
      <title>How to switch from one account to another java SDK V2 (Android)?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-switch-from-one-account-to-another-java-SDK-V2-Android/m-p/229463#M12461</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is there a way to switch from one account to another without revoking the accessToken. Since I migrated to V2 I can not manage several accounts with my app.&lt;BR /&gt;I always come back to the same account after:&lt;/P&gt;&lt;PRE&gt;//previously DbxClientV2 created
dropBoxService = null;
//previously String accessToken created
dropboxAccessToken = null;
//start to create a new one
Auth.startOAuth2Authentication(getActivity(), APP_KEY);
//finaly in on resume method:
dropboxAccessToken = Auth.getOAuth2Token();
                
DropboxClientFactory.init(dropboxAccessToken);
dropBoxService = DropboxClientFactory.getClient();
new GetCurrentAccountTask(dropBoxService, new GetCurrentAccountTask.Callback() {
                    @Override
                    public void onComplete(final FullAccount result) {

                        Log.i("DROPBOX",String.valueOf(result.getEmail()));
                        //i obtain the same previously created email and not a new one! Why?
                        
                    }               &lt;/PRE&gt;&lt;P&gt;SolidExplorer for example switches from one account to another without losing the accessToken. I can not find the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:21:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-switch-from-one-account-to-another-java-SDK-V2-Android/m-p/229463#M12461</guid>
      <dc:creator>Aristide</dc:creator>
      <dc:date>2019-05-29T09:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch from one account to another java SDK V2 (Android)?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-switch-from-one-account-to-another-java-SDK-V2-Android/m-p/230470#M12540</link>
      <description>&lt;P&gt;The access token you use identifies which account you connect to. You can store and re-use multiple different access tokens to support using multiple different accounts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's some more information here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-java/issues/92" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-java/issues/92&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 18:10:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-switch-from-one-account-to-another-java-SDK-V2-Android/m-p/230470#M12540</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-07-03T18:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch from one account to another java SDK V2 (Android)?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-switch-from-one-account-to-another-java-SDK-V2-Android/m-p/230680#M12557</link>
      <description>&lt;P&gt;Ok, Greg K thank you.&lt;/P&gt;
&lt;P&gt;I had this issue because i had used a given class of Android sample.&lt;/P&gt;
&lt;PRE&gt;DropboxClientFactory.init(dropboxAccessToken);
dropBoxService = DropboxClientFactory.getClient();&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;DropBoxClientFactory.init() method check if the client is null before to initiate a new one.&lt;/P&gt;
&lt;P&gt;Solved for me.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 19:40:33 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-switch-from-one-account-to-another-java-SDK-V2-Android/m-p/230680#M12557</guid>
      <dc:creator>Aristide</dc:creator>
      <dc:date>2017-07-04T19:40:33Z</dc:date>
    </item>
  </channel>
</rss>

