Class CommunicationTask<T>

    • Constructor Detail

      • CommunicationTask

        protected CommunicationTask​(android.content.Context context,
                                    AerisRequest request)
      • CommunicationTask

        protected CommunicationTask​(AerisRequest request)
    • Method Detail

      • executeSyncTask

        public T executeSyncTask()
        Execute the task in a non-thead environment. Useful if you want to execute the task within an intent service or other mechanism where you would like to wait for a response before continuing.
        Returns:
        T
      • onPreExecute

        protected void onPreExecute()
        Overrides:
        onPreExecute in class android.os.AsyncTask<Void,​Void,​T>
      • doInBackground

        protected T doInBackground​(Void... params)
        Specified by:
        doInBackground in class android.os.AsyncTask<Void,​Void,​T>
      • onPostExecute

        protected void onPostExecute​(T result)
        Overrides:
        onPostExecute in class android.os.AsyncTask<Void,​Void,​T>
      • unknownError

        protected AerisResponse unknownError()
        Message failed to do another reason not including IOException on the network.
        Returns:
        The AerisResponse obj
      • unknownBatchError

        protected AerisBatchResponse unknownBatchError()
        Message failed to do another reason not including IOException on the network.
        Returns:
        The AerisBatchResponse obj
      • onCancelled

        protected void onCancelled()
        Overrides:
        onCancelled in class android.os.AsyncTask<Void,​Void,​T>
      • withProgress

        public CommunicationTask<T> withProgress​(AerisProgressListener progressListener)
        Creates the task with a progress listener. The task will tell the listener toshow progress while the task is executing and to stop when the task is done.
        Parameters:
        progressListener - - Progress listener to use.
        Returns:
        The task
      • isOnline

        public static boolean isOnline​(android.content.Context context)
        Checks to see whether or not we have an established connection.
        Parameters:
        context - Context obj
        Returns:
        true if connected