Hi All,
I need help with Dropbox API and my android (Java) app.
The Idea of the app is to upload images taken from camera in my app to my own dropbox account.
I did as written, pressed the "Generated access token" button in the dropbox consul and all worked.
The problem is after few hours it expires and i get error :
W/System.err: java.lang.RuntimeException: com.dropbox.core.InvalidAccessTokenException: {"error":{".tag":"expired_access_token"},"error_summary":"expired_access_token/"}
1. if I want the app use only my own account , why is it keep expiring ?
2. Then I kept reading/investigating and I add OAuth2Authentication.
it worked well, I got the dropbox web page with permission request by user (me as its my account i try to connect to app).
I got token and I could upload the images to my account.
But again, even I saved that token in app disk for later use, after a day when I try to upload new images and I use the save token from disk, It gives me error that my token expires ....
There isn't any logic to pop the dropbox permission request page each time I want to upload images .....
This is how my code looks like (for num 2 above):
I add in my manifest :

And in code:

You can see in RED my comments to all code.
And this is the linkToDropBoxAccount() method:

Please help.