My old code uses tokens that now expire after 4 hours. I'm trying to update my Android/Java code to fix this, but I'm having trouble getting past the login ("Allow") screen.
My OLD auth code is below, and works, but expires after 4 hours:
Auth.startOAuth2Authentication(activity, appKey);
My NEW code looks like below. I get a login screen that says, "(app) would like access to...." But when I tap "Allow" in this final Dropbox login screen , I get an error which I think it coming from Dropbox (before control is returned to my Activity): "Couldn't connect to Dropbox. Please make sure you have an internet connection and try again." I'm running on actual device.
List<String> scopes = Arrays.asList("account_info.read", "files.content.write");
Auth.startOAuth2PKCE(activity, appKey, getConfig(), scopes);
My Dropbox "apps" are many years old, so not sure if this has something to do with the error.
I'm not sure how to continue. Any help would be appreciated.
I created a new Dropbox App with Permission Type: "Scoped App", and it works. So it seems Auth.startOAuth2PKCE is not working with my older pre-"scoped" apps.
Ernie