Is it possible to get an offline type access_token(oauth2.0) from the account manager in android? I will explain why i need this,
i am going to retrieve the auth token from the account manager and use it on the server side for future use. So i want the refreshing of the token to happen at the server side itself without getting it again from the account manager. For this, i need a refresh token. I read that t refresh tokens can be obtained only for "offline" type. Refer http://googlecode.blogspot.in/2011/10/upcoming-changes-to-oauth-20-endpoint.html . But account manager returns only "online" tokens and no refresh token. Also look at
When your application requests offline access, the consent page shown to a user will reflect that your application requests offline access and your application will receive an access and a refresh token. Once your application has a refresh token, it may obtain a new access token at any time.
When your application requests online access, your application will only receive an access token. No refresh token will be returned. This means that a user must be present in order for your application to obtain a new access token.
in the above link. Whenever I request for new token from account manager after the token expires, I don't get any user consent screen. So I think the account manager actually requests for offline tokens and retains the refresh tokens to itself using it to give us new tokens.
My question is How can i get an offline type access_token from account manager. Please help me.