public class ClientLoginHelper extends java.lang.Object implements IClientLoginHelper
Constructor and Description |
---|
ClientLoginHelper(android.app.Activity activity,
java.lang.String service,
java.lang.String prompt,
org.apache.http.client.HttpClient client)
Create one of these for each HttpClient needing clientlogin authentication.
|
Modifier and Type | Method and Description |
---|---|
org.apache.http.HttpResponse |
execute(org.apache.http.client.methods.HttpUriRequest request)
Wraps an HttpClient.execute() to manage the authorization headers.
|
void |
forgetAccountName()
Forget about the account the user chose.
|
java.lang.String |
getAuthToken()
Uses Google Account Manager to retrieve auth token that can
be used to access various Google APIs -- e.g., the Google Voice api.
|
public ClientLoginHelper(android.app.Activity activity, java.lang.String service, java.lang.String prompt, org.apache.http.client.HttpClient client)
activity
- An activity that can be used for user interaction.service
- The application service class (e.g. "fusiontables").prompt
- The user prompt (if needed) to choose an account.client
- The HttpClient to use (or null for a default one).public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest request) throws org.apache.http.client.ClientProtocolException, java.io.IOException
execute
in interface IClientLoginHelper
org.apache.http.client.ClientProtocolException
java.io.IOException
public void forgetAccountName()
forgetAccountName
in interface IClientLoginHelper
public java.lang.String getAuthToken() throws org.apache.http.client.ClientProtocolException
getAuthToken
in interface IClientLoginHelper
org.apache.http.client.ClientProtocolException