public class FusiontablesControl extends AndroidNonvisibleComponent implements Component
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APP_NAME |
static java.lang.String |
AUTH_TOKEN_TYPE_FUSIONTABLES |
static java.lang.String |
AUTHORIZATION_HEADER_PREFIX |
static java.lang.String |
FUSIONTABLES_POST |
static java.lang.String |
FUSIONTABLES_URL |
form
ACCELEROMETER_SENSITIVITY_MODERATE, ACCELEROMETER_SENSITIVITY_STRONG, ACCELEROMETER_SENSITIVITY_WEAK, ALIGNMENT_CENTER, ALIGNMENT_NORMAL, ALIGNMENT_OPPOSITE, ASSET_DIRECTORY, BUTTON_SHAPE_DEFAULT, BUTTON_SHAPE_OVAL, BUTTON_SHAPE_RECT, BUTTON_SHAPE_ROUNDED, COLOR_BLACK, COLOR_BLUE, COLOR_CYAN, COLOR_DEFAULT, COLOR_DKGRAY, COLOR_GRAY, COLOR_GREEN, COLOR_LTGRAY, COLOR_MAGENTA, COLOR_NONE, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, DEFAULT_VALUE_COLOR_BLACK, DEFAULT_VALUE_COLOR_BLUE, DEFAULT_VALUE_COLOR_CYAN, DEFAULT_VALUE_COLOR_DEFAULT, DEFAULT_VALUE_COLOR_DKGRAY, DEFAULT_VALUE_COLOR_GRAY, DEFAULT_VALUE_COLOR_GREEN, DEFAULT_VALUE_COLOR_LTGRAY, DEFAULT_VALUE_COLOR_MAGENTA, DEFAULT_VALUE_COLOR_NONE, DEFAULT_VALUE_COLOR_ORANGE, DEFAULT_VALUE_COLOR_PINK, DEFAULT_VALUE_COLOR_RED, DEFAULT_VALUE_COLOR_WHITE, DEFAULT_VALUE_COLOR_YELLOW, DIRECTION_EAST, DIRECTION_MAX, DIRECTION_MIN, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_NORTHEAST, DIRECTION_NORTHWEST, DIRECTION_SOUTH, DIRECTION_SOUTHEAST, DIRECTION_SOUTHWEST, DIRECTION_WEST, FONT_DEFAULT_SIZE, LAYOUT_ORIENTATION_HORIZONTAL, LAYOUT_ORIENTATION_VERTICAL, LENGTH_FILL_PARENT, LENGTH_PREFERRED, LENGTH_UNKNOWN, SLIDER_MAX_VALUE, SLIDER_MIN_VALUE, SLIDER_THUMB_VALUE, TOAST_LENGTH_LONG, TOAST_LENGTH_SHORT, TYPEFACE_DEFAULT, TYPEFACE_MONOSPACE, TYPEFACE_SANSSERIF, TYPEFACE_SERIF
Constructor and Description |
---|
FusiontablesControl(ComponentContainer componentContainer) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
ApiKey()
Getter for the API key.
|
void |
ApiKey(java.lang.String apiKey)
Setter for the app developer's API key.
|
void |
DoQuery() |
void |
ForgetLogin() |
void |
GetRows(java.lang.String tableId,
java.lang.String columns) |
void |
GetRowsWithConditions(java.lang.String tableId,
java.lang.String columns,
java.lang.String conditions) |
void |
GotResult(java.lang.String result) |
void |
handleOAuthError(java.lang.String msg)
Callback used for error reporting.
|
static java.lang.String |
httpApacheResponseToString(org.apache.http.HttpResponse response)
Handles Apache Http Response.
|
static java.lang.String |
httpResponseToString(com.google.api.client.http.HttpResponse response)
Static utility method to prettify the HttpResponse.
|
void |
InsertRow(java.lang.String tableId,
java.lang.String columns,
java.lang.String values) |
java.lang.String |
KeyFile() |
void |
KeyFile(java.lang.String path) |
static java.lang.String |
parseResponse(java.io.InputStream input)
Parses the input stream returned from Http query
|
java.lang.String |
Query() |
void |
Query(java.lang.String query) |
void |
SendQuery()
Calls QueryProcessor to execute the API request asynchronously, if
the user has already authenticated with the Fusiontables service.
|
com.google.api.client.http.HttpResponse |
sendQuery(java.lang.String query,
java.lang.String authToken)
Executes a Fusiontable query with an OAuth 2.0 authenticated
request.
|
java.lang.String |
ServiceAccountEmail()
Property for the service account email to use when using service authentication.
|
void |
ServiceAccountEmail(java.lang.String email) |
boolean |
UseServiceAuthentication()
Property to determine whether to use service authentication or user authentication.
|
void |
UseServiceAuthentication(boolean bool) |
getDispatchDelegate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDispatchDelegate
public static final java.lang.String FUSIONTABLES_POST
public static final java.lang.String AUTHORIZATION_HEADER_PREFIX
public static final java.lang.String FUSIONTABLES_URL
public static final java.lang.String AUTH_TOKEN_TYPE_FUSIONTABLES
public static final java.lang.String APP_NAME
public FusiontablesControl(ComponentContainer componentContainer)
public boolean UseServiceAuthentication()
public void UseServiceAuthentication(boolean bool)
public java.lang.String ServiceAccountEmail()
public void ServiceAccountEmail(java.lang.String email)
public void ApiKey(java.lang.String apiKey)
public java.lang.String ApiKey()
public void Query(java.lang.String query)
public java.lang.String Query()
public void KeyFile(java.lang.String path)
public java.lang.String KeyFile()
public void SendQuery()
public void DoQuery()
public void GotResult(java.lang.String result)
public void ForgetLogin()
public void InsertRow(java.lang.String tableId, java.lang.String columns, java.lang.String values)
public void GetRows(java.lang.String tableId, java.lang.String columns)
public void GetRowsWithConditions(java.lang.String tableId, java.lang.String columns, java.lang.String conditions)
public com.google.api.client.http.HttpResponse sendQuery(java.lang.String query, java.lang.String authToken)
query
- the raw SQL string used by App InventorauthToken
- the OAuth 2.0 access tokenpublic static java.lang.String httpResponseToString(com.google.api.client.http.HttpResponse response)
response
- public static java.lang.String httpApacheResponseToString(org.apache.http.HttpResponse response)
response
- public static java.lang.String parseResponse(java.io.InputStream input)
input
- public void handleOAuthError(java.lang.String msg)
msg
-