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

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

  •  12-06-2023
  •  | 
  •  

문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top