The constructor AndroidAuthSession(AppKeyPair, Session.AccessType, AccessTokenPair) is deprecated

StackOverflow https://stackoverflow.com/questions/22305523

  •  12-06-2023
  •  | 
  •  

Question

I am trying to implement the Dropbox Core API which uploads images from Android phone to Dropbox. However, there is this warning about the constructor used to authorize dropbox account is deprecated. This may have led to the error of not being able to link my Android phone to my Dropbox account.

Warning: The constructor AndroidAuthSession(AppKeyPair, Session.AccessType, AccessTokenPair) is deprecated.

Anyone knows what is the problem and how to solve it?

Thanks!

Was it helpful?

Solution

This constructor is deprecated because it is no longer necessary to explicitly indicate the access type, as the API can infer this from your app key:

AndroidAuthSession(AppKeyPair appKeyPair, Session.AccessType type, AccessTokenPair accessTokenPair)

Instead, you can use this constructor:

AndroidAuthSession(AppKeyPair appKeyPair, AccessTokenPair accessTokenPair)

Note, in the current version of the SDK, this version is also marked deprecated, but this is mistaken and will be corrected in the future.

In any case, using a deprecated constructor like this shouldn't actually cause an error, so it sounds like you may want to ask another question with the details of the error you are getting.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top