public class ImportFileTask extends android.os.AsyncTask<java.lang.String,ImportFileTask.ProgressUpdate,ImportFileTask.Result>
Modifier and Type | Class and Description |
---|---|
static interface |
ImportFileTask.Callback
Provides a mechanism to be notified once a file has been "imported" Allows injection of
additional logic beyond notifying user of success/failure Invoked if import is successful, or
fails, but not if cancelled
|
protected static class |
ImportFileTask.ProgressUpdate |
static class |
ImportFileTask.Result
Result of import attempt
Note, for most implementations, this currently means the import was
initiated and is processing, not necessarily completed successfully
|
Modifier and Type | Field and Description |
---|---|
protected android.content.Context |
_context |
static int |
FlagCopyFile
Set flag to leave original file in place.
|
static int |
FlagHideFile |
static int |
FlagImportInPlace
Set flag to import from source location.
|
static int |
FlagKMZStrictMode
See ImportKMZSort._bStrict
|
static int |
FlagPromptOnMultipleMatch |
static int |
FlagPromptOverwrite |
static int |
FlagShowNotificationsDuringImport |
static int |
FlagSkipDeleteOnMD5Match |
static int |
FlagValidateExt |
static int |
FlagZoomToFile |
Constructor and Description |
---|
ImportFileTask(android.content.Context context,
ImportFileTask.Callback callback) |
Modifier and Type | Method and Description |
---|---|
void |
addFlag(int flagBits) |
boolean |
checkFlag(int flagBits) |
static boolean |
checkFlag(int flags,
int flagBits) |
protected ImportFileTask.Result |
doInBackground(java.lang.String... params) |
int |
getFlags()
Get the style property value
|
protected void |
onPostExecute(ImportFileTask.Result result) |
protected void |
onProgressUpdate(ImportFileTask.ProgressUpdate... updates)
Currently, this is used to execute things on the main UI thread, since trying to
pop up a dialog from within an AsyncTask will cause an error.
|
void |
removeFlag(int flagBits) |
void |
setFlags(int flags)
Set the flags property value
|
protected final android.content.Context _context
public static final int FlagValidateExt
public static final int FlagPromptOverwrite
public static final int FlagSkipDeleteOnMD5Match
public static final int FlagCopyFile
public static final int FlagImportInPlace
public static final int FlagKMZStrictMode
public static final int FlagPromptOnMultipleMatch
public static final int FlagShowNotificationsDuringImport
public static final int FlagZoomToFile
public static final int FlagHideFile
public ImportFileTask(android.content.Context context, ImportFileTask.Callback callback)
public int getFlags()
public boolean checkFlag(int flagBits)
public static boolean checkFlag(int flags, int flagBits)
public void setFlags(int flags)
flags
- a bitfieldpublic void addFlag(int flagBits)
public void removeFlag(int flagBits)
protected ImportFileTask.Result doInBackground(java.lang.String... params)
doInBackground
in class android.os.AsyncTask<java.lang.String,ImportFileTask.ProgressUpdate,ImportFileTask.Result>
protected void onPostExecute(ImportFileTask.Result result)
onPostExecute
in class android.os.AsyncTask<java.lang.String,ImportFileTask.ProgressUpdate,ImportFileTask.Result>
protected void onProgressUpdate(ImportFileTask.ProgressUpdate... updates)
onProgressUpdate
in class android.os.AsyncTask<java.lang.String,ImportFileTask.ProgressUpdate,ImportFileTask.Result>