public class MyLibraryAsync extends android.os.AsyncTask<MyLibraryInputModel,java.lang.Void,java.lang.Void>
Modifier and Type | Class and Description |
---|---|
static interface |
MyLibraryAsync.MyLibraryListener
Interface used to allow the caller of a MyLibraryAsynTask to run some code when get
responses.
|
Constructor and Description |
---|
MyLibraryAsync(MyLibraryInputModel myLibraryInputModel,
MyLibraryAsync.MyLibraryListener listener,
android.content.Context context)
Constructor to initialise the private data members.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Void |
doInBackground(MyLibraryInputModel... params)
Background thread to execute.
|
protected void |
onPostExecute(java.lang.Void result) |
protected void |
onPreExecute() |
public MyLibraryAsync(MyLibraryInputModel myLibraryInputModel, MyLibraryAsync.MyLibraryListener listener, android.content.Context context)
myLibraryInputModel
- A Model Class which is use for background task, we need to set all the attributes through setter methods of input model class,
For Example: to use this API we have to set following attributes:
setAuthToken(),setUser_id() etc.listener
- MyLibrary Listenercontext
- android.content.Contextprotected java.lang.Void doInBackground(MyLibraryInputModel... params)
doInBackground
in class android.os.AsyncTask<MyLibraryInputModel,java.lang.Void,java.lang.Void>
protected void onPreExecute()
onPreExecute
in class android.os.AsyncTask<MyLibraryInputModel,java.lang.Void,java.lang.Void>
protected void onPostExecute(java.lang.Void result)
onPostExecute
in class android.os.AsyncTask<MyLibraryInputModel,java.lang.Void,java.lang.Void>