public class MissionPackageApi
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INTENT_EXTRA_MISSIONPACKAGEMANIFEST
MissionPackage Extra [Required] Type: MissionPackageManifest An instance of
MissionPackageManifest which contains files and/or ATAK Map Items to include in the Mission
Package.
|
static java.lang.String |
INTENT_EXTRA_MISSIONPACKAGEMANIFEST_UID |
static java.lang.String |
INTENT_EXTRA_NOTIFICATION_ID
NotificationId Extra Type: int See FileTransfer extra
|
static java.lang.String |
INTENT_EXTRA_PATH |
static java.lang.String |
INTENT_EXTRA_RECEIVERS
Receivers Extra [Optional] Type: NetworkContact Parcelable Array.
|
static java.lang.String |
INTENT_EXTRA_SAVEANDSEND
SaveAndSend Extra [Optional] Type: boolean Omit or false to save only.
|
static java.lang.String |
INTENT_EXTRA_SENDERCALLBACKCLASSNAME
SenderCallbackClassName Extra [Optional] Type: String Name of class to invoke when save is
complete and when Contact List has been launched.
|
static java.lang.String |
INTENT_EXTRA_SENDERCALLBACKPACKAGENAME
SenderCallbackClassName Extra [Optional] Type: String Name of class to invoke when save is
complete and when Contact List has been launched.
|
static java.lang.String |
INTENT_EXTRA_SENDERCALLSIGN
Sender Callsign Extra Type: String A custom intent may sent on the receiving device once
the Mission Package has been extracted.
|
static java.lang.String |
INTENT_EXTRA_SENDONLY
SaveOnly Extra [Optional}: boolean Omit or false to save prior to sending.
|
static java.lang.String |
INTENT_MISSIONPACKAGE_DELETE
Action for intent to delete an existing Mission Package
|
static java.lang.String |
INTENT_MISSIONPACKAGE_SAVE
Action for intent to save a new Mission Package
|
static java.lang.String |
INTENT_MISSIONPACKAGE_UPDATE
Action for intent to update an existing Mission Package
|
Constructor and Description |
---|
MissionPackageApi() |
Modifier and Type | Method and Description |
---|---|
static MissionPackageManifest |
CreateTempManifest(java.lang.String name)
Create a manifest such that zip will be created in a temp directory
This directory is periodically cleaned out (contents securely deleted)
Use default import instructions
|
static MissionPackageManifest |
CreateTempManifest(java.lang.String name,
boolean bImport,
boolean bDelete,
java.lang.String onReceiveAction)
Create a manifest such that zip will be created in a temp directory
This directory is periodically cleaned out (contents securely deleted)
Set import instructions
|
static boolean |
Delete(android.content.Context context,
MissionPackageManifest manifest)
Send an intent to Delete the specified Mission Package
|
static boolean |
prepareSend(MissionPackageManifest manifest,
java.lang.Class<? extends SaveAndSendCallback> callbackClazz,
boolean sendOnly)
Brings up the contacts list BEFORE posting to the server
|
static boolean |
Save(android.content.Context context,
MissionPackageManifest manifest,
java.lang.Class<? extends SaveAndSendCallback> callbackClazz)
Send an intent to Save the specified Mission Package with the provided parameters The
specified contents will be compressed into Mission Package .zip
|
static boolean |
Send(android.content.Context context,
MissionPackageManifest manifest,
java.lang.Class<? extends SaveAndSendCallback> callbackClazz,
Contact[] netContacts)
Send an intent to Save and Send the specified Mission Package with the provided parameters
The specified contents will be compressed into Mission Package .zip and then sent to the
specified contacts.
|
static boolean |
Send(android.content.Context context,
MissionPackageManifest manifest,
java.lang.Class<? extends SaveAndSendCallback> callbackClazz,
Contact[] netContacts,
boolean sendOnly)
Send an intent to Save and Send the specified Mission Package with the provided parameters
The specified contents will be compressed into Mission Package .zip and then sent to the
specified contacts.
|
static boolean |
Send(java.io.File file)
Quick send of file as a Mission Package, display contact list to select recipients
Package is auto deleted on sender and recipient
|
static boolean |
Send(java.io.File file,
java.lang.String title)
Quick send of file as a Mission Package, display contact list to select recipients
Package is auto deleted on sender and recipient
|
static boolean |
SendUIDs(android.content.Context context,
MissionPackageManifest manifest,
java.lang.Class<? extends SaveAndSendCallback> callbackClazz,
java.lang.String[] toUIDs,
boolean sendOnly) |
static boolean |
SendUIDs(android.content.Context context,
MissionPackageManifest manifest,
java.lang.String callbackClassName,
java.lang.String[] toUIDs,
boolean sendOnly)
Send an intent to Save and Send the specified Mission Package with the provided parameters
The specified contents will be compressed into Mission Package .zip and then sent to the
specified contacts.
|
static boolean |
Update(android.content.Context context,
java.lang.String missionPackageUID,
java.lang.String[] mapItemUIDArray,
java.lang.String[] files,
boolean bSave,
java.lang.Class<? extends SaveAndSendCallback> callbackClazz)
Send an intent to Update the specified Mission Package by adding the
specified map items and files.
|
public static final java.lang.String INTENT_MISSIONPACKAGE_SAVE
public static final java.lang.String INTENT_MISSIONPACKAGE_UPDATE
public static final java.lang.String INTENT_MISSIONPACKAGE_DELETE
public static final java.lang.String INTENT_EXTRA_MISSIONPACKAGEMANIFEST
public static final java.lang.String INTENT_EXTRA_MISSIONPACKAGEMANIFEST_UID
public static final java.lang.String INTENT_EXTRA_PATH
public static final java.lang.String INTENT_EXTRA_SAVEANDSEND
public static final java.lang.String INTENT_EXTRA_SENDONLY
public static final java.lang.String INTENT_EXTRA_SENDERCALLBACKCLASSNAME
SaveAndSendCallback
as reflection is used to instantiate the class via a
parameterless constructor. Note the callback will be invoked once compression (save) is
complete, and again once the Contact List has been launched. The callback may check the type
of the provided task to determine which step has completed, and may obtain the Context or
ATAK MapView from the task. If a callback needs access to the "local" tool which is being
integrated the code may access a singleton provided by the tool implementation, or provide an
alternative method to get a reference to required resources. Note that use of Proguard and
inline classes may prohibit the execution of the required parameter-less constructor via
Reflection in the callback class.public static final java.lang.String INTENT_EXTRA_SENDERCALLBACKPACKAGENAME
SaveAndSendCallback
as reflection is used to instantiate the class via a
parameterless constructor.public static final java.lang.String INTENT_EXTRA_RECEIVERS
NetworkContacts
to send to specific users.
Only processed if SaveAndSend is truepublic static final java.lang.String INTENT_EXTRA_SENDERCALLSIGN
public static final java.lang.String INTENT_EXTRA_NOTIFICATION_ID
public static boolean Save(android.content.Context context, MissionPackageManifest manifest, java.lang.Class<? extends SaveAndSendCallback> callbackClazz)
context
- [required]manifest
- [required]callbackClazz
- [optional]public static boolean Send(android.content.Context context, MissionPackageManifest manifest, java.lang.Class<? extends SaveAndSendCallback> callbackClazz, Contact[] netContacts)
context
- [required]manifest
- [required]callbackClazz
- [optional]netContacts
- [optional]public static boolean Send(android.content.Context context, MissionPackageManifest manifest, java.lang.Class<? extends SaveAndSendCallback> callbackClazz, Contact[] netContacts, boolean sendOnly)
context
- [required]manifest
- [required]callbackClazz
- [optional]netContacts
- [optional]sendOnly
- if true, skip saving/compression, and just send an existing packagepublic static boolean Send(java.io.File file)
file
- file to send [required]public static boolean Send(java.io.File file, java.lang.String title)
file
- file to send [required]title
- title of mission package[required]public static boolean SendUIDs(android.content.Context context, MissionPackageManifest manifest, java.lang.String callbackClassName, java.lang.String[] toUIDs, boolean sendOnly)
context
- [required]manifest
- [required]callbackClassName
- [optional]toUIDs
- [optional]sendOnly
- if true, skip saving/compression, and just send an existing packagepublic static boolean SendUIDs(android.content.Context context, MissionPackageManifest manifest, java.lang.Class<? extends SaveAndSendCallback> callbackClazz, java.lang.String[] toUIDs, boolean sendOnly)
public static boolean prepareSend(MissionPackageManifest manifest, java.lang.Class<? extends SaveAndSendCallback> callbackClazz, boolean sendOnly)
manifest
- Mission package manifestcallbackClazz
- Callback classsendOnly
- True to only send, false to compress before sendingpublic static boolean Update(android.content.Context context, java.lang.String missionPackageUID, java.lang.String[] mapItemUIDArray, java.lang.String[] files, boolean bSave, java.lang.Class<? extends SaveAndSendCallback> callbackClazz)
context
- [required]missionPackageUID
- [required] UID of package to updatemapItemUIDArray
- [optional]files
- [optional]bSave
- true to save, false to just add to UI listcallbackClazz
- [optional]public static boolean Delete(android.content.Context context, MissionPackageManifest manifest)
context
- [required]manifest
- [required] package to deletepublic static MissionPackageManifest CreateTempManifest(java.lang.String name)
name
- the name of the manifestpublic static MissionPackageManifest CreateTempManifest(java.lang.String name, boolean bImport, boolean bDelete, java.lang.String onReceiveAction)
name
- name of packagebImport
- true to run extracted files against Import ManagerbDelete
- true to delete .zip after extractiononReceiveAction
- Intent action to broadcast on receiver after extraction/deletion