public class ImportExportMapComponent extends AbstractMapComponent implements CotServiceRemote.ConnectionListener, CotServiceRemote.CotEventListener, MapEventDispatcher.MapEventDispatchListener
AbstractMapComponent.OnAllComponentsCreatedCallback
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_DELETE_DATA |
static java.lang.String |
ACTION_IMPORT_DATA |
static java.lang.String |
EXPORT_LOGS
Intent action to export crash logs
|
static java.lang.String |
FTP_UPLOAD_FILE_ACTION
Intent action to allow user to upload a file from file system to an FTP server.
|
static java.lang.String |
IMPORT_COMPLETE |
static java.lang.String |
IMPORT_COT
Handle the CoT Event that is being imported
|
static java.lang.String |
IMPORT_EXPORT_COMPONENT_READY_ACTION
Required extra for import factory class registration.
|
static java.lang.String |
KML_NETWORK_LINK_REFRESH
Intent action to start/stop a KML Network Link refresh timer/task
|
static java.lang.String |
SET_EXPORT_LOG_SERVER |
protected static java.lang.String |
TAG |
static java.lang.String |
USER_HANDLE_IMPORT_FILE_ACTION
Intent action to allow import a file being opened by user/3rd party app.
|
static java.lang.String |
USER_IMPORT_FILE_ACTION
Intent action to display UI to allow user to import a file from availble sources
|
static java.lang.String |
ZOOM_TO_FILE_ACTION |
Constructor and Description |
---|
ImportExportMapComponent() |
Modifier and Type | Method and Description |
---|---|
void |
addImporterClass(ImportResolver resolver)
Dynamically register an
ImportResolver instance to import files
from Import Manager and Mission Package Tool |
void |
addImportListener(ImportListener l) |
void |
download(RemoteResource resource) |
void |
download(RemoteResource resource,
boolean showNotifications) |
java.util.Collection<ImportResolver> |
getImporterResolvers()
Get list of
ImportResolver |
java.util.List<ImportListener> |
getImportListeners() |
static ImportExportMapComponent |
getInstance() |
void |
onCotEvent(CotEvent event,
android.os.Bundle extra)
Callback for when a CoT event is received.
|
void |
onCotServiceConnected(android.os.Bundle fullServiceState) |
void |
onCotServiceDisconnected() |
void |
onCreate(android.content.Context context,
android.content.Intent intent,
MapView mapView)
Called when the component is first created
|
protected void |
onDestroyImpl(android.content.Context context,
MapView view)
This method is invoked as a subset of the onDestroy call as part of the
MapComponent lifecycle.
|
void |
onMapEvent(MapEvent event) |
void |
refreshNetworkLink(RemoteResource res,
boolean stop) |
void |
refreshNetworkLink(java.lang.String url,
java.lang.String name,
long interval,
boolean stop) |
void |
removeImporterClass(ImportResolver resolver) |
void |
removeImportListener(ImportListener l) |
addOverlay, onConfigurationChanged, onCreateOptionsMenu, onDestroy, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onStart, onStop, registerReceiver, removeOverlay, setOnAllComponentsCreatedCallback, unregisterReceiver
protected static final java.lang.String TAG
public static final java.lang.String ACTION_IMPORT_DATA
public static final java.lang.String ACTION_DELETE_DATA
public static final java.lang.String IMPORT_COMPLETE
public static final java.lang.String USER_IMPORT_FILE_ACTION
public static final java.lang.String USER_HANDLE_IMPORT_FILE_ACTION
public static final java.lang.String KML_NETWORK_LINK_REFRESH
public static final java.lang.String IMPORT_COT
public static final java.lang.String IMPORT_EXPORT_COMPONENT_READY_ACTION
public static final java.lang.String FTP_UPLOAD_FILE_ACTION
public static final java.lang.String EXPORT_LOGS
public static final java.lang.String SET_EXPORT_LOG_SERVER
public static final java.lang.String ZOOM_TO_FILE_ACTION
public static ImportExportMapComponent getInstance()
public void onCreate(android.content.Context context, android.content.Intent intent, MapView mapView)
MapComponent
onCreate
in interface MapComponent
context
- the context of the component (the MapActivity instance)intent
- the intent of the MapActivitymapView
- the main MapViewprotected void onDestroyImpl(android.content.Context context, MapView view)
AbstractMapComponent
onDestroyImpl
in class AbstractMapComponent
public void download(RemoteResource resource, boolean showNotifications)
public void download(RemoteResource resource)
public void onCotServiceConnected(android.os.Bundle fullServiceState)
onCotServiceConnected
in interface CotServiceRemote.ConnectionListener
fullServiceState
- (Bundle[]) fullServiceState.getParcelableArray("streams") which appears to be and array of
all of the current TAK servers bundle made up of CotPort.DESCRIPTION_KEY,
CotPort.ENABLED_KEY, CotPort.CONNECTED_KEY
lifted from CotStreamListener
fullServiceState can also contain
(Bundle[]) fullServiceState.getParcelableArray(getPortType()) which follows the same rules
above.
lifted from CotPortListActivitypublic void onCotServiceDisconnected()
onCotServiceDisconnected
in interface CotServiceRemote.ConnectionListener
public void onMapEvent(MapEvent event)
onMapEvent
in interface MapEventDispatcher.MapEventDispatchListener
public void onCotEvent(CotEvent event, android.os.Bundle extra)
CotServiceRemote.CotEventListener
onCotEvent
in interface CotServiceRemote.CotEventListener
event
- the cot event.extra
- the bundle which contains information such as where it was from.public void addImporterClass(ImportResolver resolver)
ImportResolver
instance to import files
from Import Manager and Mission Package Toolresolver
- public void removeImporterClass(ImportResolver resolver)
public java.util.Collection<ImportResolver> getImporterResolvers()
ImportResolver
public void addImportListener(ImportListener l)
public void removeImportListener(ImportListener l)
public java.util.List<ImportListener> getImportListeners()
public void refreshNetworkLink(RemoteResource res, boolean stop)
public void refreshNetworkLink(java.lang.String url, java.lang.String name, long interval, boolean stop)