How to get OAuth 2 refresh token using access token
I am developing an app in which i am using OAuth 2.0 to upload data in user Google label. I am able to connect to the users mail and after some time access token expires. How to get new access token using Token refresher? I am using javamail sample code to authenticate and get access token. I am searching it from many days but did not found any running code. I am new to android, so please provide some code or complete sample code. I got the answer now i want to share to all of you because many questions are unanswered. to get a new token first you have to invalidate the token using below code