public class LoginTask extends ConnectionTask<Void,Void,Boolean>
Copyright (c) 2011-2014 Bit Stadium GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Constructor and Description |
---|
LoginTask(android.content.Context context,
android.os.Handler handler,
String urlString,
int mode,
Map<String,String> params)
Send feedback
AsyncTask . |
Modifier and Type | Method and Description |
---|---|
void |
attach(android.content.Context context,
android.os.Handler handler) |
void |
detach() |
protected Boolean |
doInBackground(Void... args) |
protected void |
onPostExecute(Boolean success) |
protected void |
onPreExecute() |
void |
setShowProgressDialog(boolean showProgressDialog) |
getStringFromConnection
public LoginTask(android.content.Context context, android.os.Handler handler, String urlString, int mode, Map<String,String> params)
AsyncTask
.
If the class is intended to send a simple feedback message, the a POST is made with the specific data
If the class is intended to fetch the messages by providing a token, a GET is madecontext
- Context
objecthandler
- Handler object to send data back to the activityurlString
- URL for Identity Checkmode
- LoginManager.LOGIN_MODE_ANONYMOUS, LoginManager.LOGIN_MODE_EMAIL_ONLY,
LoginManager.LOGIN_MODE_EMAIL_PASSWORD, or LoginManager.LOGIN_MODE_VALIDATEparams
- a map for all key value params.public void setShowProgressDialog(boolean showProgressDialog)
public void attach(android.content.Context context, android.os.Handler handler)
public void detach()
protected void onPreExecute()
Copyright © 2015. All Rights Reserved.