public class CotMapComponent extends AbstractMapComponent implements CotServiceRemote.CotEventListener, CommsMapComponent.DirectCotProcessor, ReportingRate.Callback
AbstractMapComponent.OnAllComponentsCreatedCallback
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREF_API_SECURE_PORT |
static java.lang.String |
PREF_API_UNSECURE_PORT |
static java.lang.String |
TAG |
Constructor and Description |
---|
CotMapComponent() |
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalDetail(java.lang.String detailName,
CotDetail detail)
Allows for a Self SA (PPLI) message to contain additional dynamically registered information.
|
boolean |
addToolProfileRequest(java.lang.String tool)
Request the specified tool be downloaded from TAK Server
Note, could extend this to provide a DeviceProfileCallback, this currently uses a default impl
|
java.lang.Integer |
getBatteryPercent() |
ContactConnectorManager |
getContactConnectorMgr() |
ContactListAdapter |
getContactListAdapter()
Deprecated.
|
ContactPresenceDropdown |
getContactPresenceReceiver()
Get the contract presence drop down for the system
|
CotServiceRemote |
getCotServiceRemote() |
static java.lang.String |
getEndpoint() |
static CotDispatcher |
getExternalDispatcher() |
static CotMapComponent |
getInstance() |
static CotDispatcher |
getInternalDispatcher() |
static CotPoint |
getLastPoint(MapView view,
android.content.SharedPreferences prefs)
Get last saved point, if no point has been saved return 0,0,0
|
GeoPoint |
getReportingPoint() |
double |
getReportingSpeed() |
IndividualContact |
getSelfContact(boolean bDeep)
'Self' is not stored by Contacts
|
java.lang.String |
getServerCallsign(java.lang.String uid)
Deprecated.
|
java.lang.String |
getServerCallsign(java.lang.String connectString,
java.lang.String uid) |
ServerContact |
getServerContact(java.lang.String connectString,
java.lang.String uid) |
java.util.List<ServerContact> |
getServerContacts(java.lang.String connectString)
Get list of server contacts, for servers that this device has connected to, at least
once since ATAK startup.
|
CotPortListActivity.CotPort[] |
getServers()
Get server connections
|
ServerVersion |
getServerVersion(java.lang.String hostname) |
static boolean |
hasServer() |
boolean |
isServerConnected()
Check if we have at least one connection to a TAK server
|
void |
onCotEvent(CotEvent event,
android.os.Bundle extra)
Callback for when a CoT event is received.
|
void |
onCreate(android.content.Context context,
android.content.Intent intent,
MapView view)
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.
|
CommsMapComponent.ImportResult |
processCotEvent(CotEvent event,
android.os.Bundle extra)
Allow for the CotService.DirectCotProcessor processing of a CotEvent without
receiving it traditionally from the onCotEvent dispatch pump.
|
CotDetail |
removeAdditionalDetail(java.lang.String detailName)
Remove a detail tag previously registered by a client.
|
boolean |
removeToolProfileRequest(java.lang.String tool) |
void |
report(int stale,
int flags) |
ServerVersion |
setServerVersion(ServerVersion ver) |
void |
stale(java.lang.String[] uid) |
addOverlay, onConfigurationChanged, onCreateOptionsMenu, onDestroy, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onStart, onStop, registerReceiver, removeOverlay, setOnAllComponentsCreatedCallback, unregisterReceiver
public static final java.lang.String TAG
public static final java.lang.String PREF_API_SECURE_PORT
public static final java.lang.String PREF_API_UNSECURE_PORT
@Deprecated public ContactListAdapter getContactListAdapter()
public void onCreate(android.content.Context context, android.content.Intent intent, MapView view)
MapComponent
onCreate
in interface MapComponent
context
- the context of the component (the MapActivity instance)intent
- the intent of the MapActivityview
- the main MapViewprotected void onDestroyImpl(android.content.Context context, MapView view)
AbstractMapComponent
onDestroyImpl
in class AbstractMapComponent
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 CommsMapComponent.ImportResult processCotEvent(CotEvent event, android.os.Bundle extra)
processCotEvent
in interface CommsMapComponent.DirectCotProcessor
public CotServiceRemote getCotServiceRemote()
public static CotMapComponent getInstance()
public ContactConnectorManager getContactConnectorMgr()
public java.lang.Integer getBatteryPercent()
public IndividualContact getSelfContact(boolean bDeep)
public void addAdditionalDetail(java.lang.String detailName, CotDetail detail)
public CotDetail removeAdditionalDetail(java.lang.String detailName)
detailName
- public static java.lang.String getEndpoint()
public ContactPresenceDropdown getContactPresenceReceiver()
public static CotPoint getLastPoint(MapView view, android.content.SharedPreferences prefs)
prefs
- the shared preference to use when pulling the last saved pointpublic static CotDispatcher getExternalDispatcher()
public static CotDispatcher getInternalDispatcher()
public GeoPoint getReportingPoint()
getReportingPoint
in interface ReportingRate.Callback
public double getReportingSpeed()
getReportingSpeed
in interface ReportingRate.Callback
public void report(int stale, int flags)
report
in interface ReportingRate.Callback
public java.util.List<ServerContact> getServerContacts(java.lang.String connectString)
connectString
- Pass null to get contacts for all serverspublic ServerContact getServerContact(java.lang.String connectString, java.lang.String uid)
@Deprecated public java.lang.String getServerCallsign(java.lang.String uid)
public java.lang.String getServerCallsign(java.lang.String connectString, java.lang.String uid)
public ServerVersion getServerVersion(java.lang.String hostname)
public ServerVersion setServerVersion(ServerVersion ver)
public boolean isServerConnected()
public CotPortListActivity.CotPort[] getServers()
public static boolean hasServer()
public boolean addToolProfileRequest(java.lang.String tool)
public boolean removeToolProfileRequest(java.lang.String tool)
public void stale(java.lang.String[] uid)