public static class SendDialog.Builder
extends java.lang.Object
SendDialog
Modifier and Type | Method and Description |
---|---|
SendDialog.Builder |
addAttachment(java.io.File file,
MapItem item)
Add a file attached to a map item
|
SendDialog.Builder |
addAttachment(java.io.File file,
java.lang.String contentType,
MapItem item)
Add a file attached to a map item
|
SendDialog.Builder |
addAttachment(ResourceFile file,
MapItem item)
Add a file attached to a map item
|
SendDialog.Builder |
addFile(java.io.File file)
Add a file to be sent
|
SendDialog.Builder |
addFile(java.io.File file,
java.lang.String contentType)
Add a file with content type
|
SendDialog.Builder |
addFile(ResourceFile file)
Add a file with content and mime type
|
SendDialog.Builder |
addMapItem(MapItem item)
Add a map item to be sent
|
SendDialog.Builder |
addMapItem(java.lang.String uid)
Add a map item UID
|
SendDialog |
build()
Build the send dialog
|
SendDialog.Builder |
setCallback(URIContentSender.Callback callback)
Set a callback that's fired once content has been sent
|
SendDialog.Builder |
setDeleteOnReceive(boolean deleteOnReceive)
Flag that the data package should be removed upon being received
|
SendDialog.Builder |
setIcon(android.graphics.drawable.Drawable icon)
Set the display icon
|
SendDialog.Builder |
setIcon(int iconId)
Set the display icon
|
SendDialog.Builder |
setImportOnReceive(boolean importOnReceive)
Flag that this content should be imported upon being received
|
SendDialog.Builder |
setMissionPackage(MissionPackageManifest mpm)
Set the base data package manifest (optional)
Content that is added via other *add calls will automatically be
added to this data package.
|
SendDialog.Builder |
setMissionPackageCallback(MissionPackageBaseTask.Callback cb)
Set the data package task callback
|
SendDialog.Builder |
setName(java.lang.String name)
Set the display name for the content being sent
|
SendDialog.Builder |
setOnReceiveAction(java.lang.String intentAction)
Set an intent to be fired when the data package is received
|
SendDialog.Builder |
setRecipientCallback(URIContentRecipient.Callback callback)
Set a callback that's fired when the user has selected which
recipients to send content to
Note: Some senders do not support this workflow.
|
SendDialog.Builder |
setURI(java.lang.String uri)
Set the base content URI (optional)
This takes precedence over all other added content, meaning it should
only be used by itself (no other calls to
addFile(File)
or addMapItem(String) ). |
SendDialog |
show()
Show the send dialog
|
public Builder(MapView mapView)
public SendDialog.Builder setName(java.lang.String name)
name
- Display namepublic SendDialog.Builder setIcon(android.graphics.drawable.Drawable icon)
icon
- Icon drawablepublic SendDialog.Builder setIcon(int iconId)
iconId
- Icon resource ID (app context)public SendDialog.Builder setURI(java.lang.String uri)
addFile(File)
or addMapItem(String)
).uri
- Content URIpublic SendDialog.Builder setCallback(URIContentSender.Callback callback)
callback
- Callbackpublic SendDialog.Builder setRecipientCallback(URIContentRecipient.Callback callback)
callback
- Recipients selected callbackpublic SendDialog.Builder setMissionPackage(MissionPackageManifest mpm)
mpm
- Data packagepublic SendDialog.Builder setMissionPackageCallback(MissionPackageBaseTask.Callback cb)
cb
- Callbackpublic SendDialog.Builder setImportOnReceive(boolean importOnReceive)
importOnReceive
- True to import on receivepublic SendDialog.Builder setDeleteOnReceive(boolean deleteOnReceive)
deleteOnReceive
- True to delete on receivepublic SendDialog.Builder setOnReceiveAction(java.lang.String intentAction)
intentAction
- Intent actionpublic SendDialog.Builder addFile(ResourceFile file)
file
- Resource filepublic SendDialog.Builder addFile(java.io.File file, java.lang.String contentType)
file
- FilecontentType
- Importer content typepublic SendDialog.Builder addFile(java.io.File file)
file
- Filepublic SendDialog.Builder addMapItem(java.lang.String uid)
uid
- Map item UIDpublic SendDialog.Builder addMapItem(MapItem item)
item
- Map itempublic SendDialog.Builder addAttachment(ResourceFile file, MapItem item)
file
- Resource file attachmentitem
- Map item the file is attached topublic SendDialog.Builder addAttachment(java.io.File file, java.lang.String contentType, MapItem item)
file
- File attachmentcontentType
- File content typeitem
- Map item the file is attached topublic SendDialog.Builder addAttachment(java.io.File file, MapItem item)
file
- File attachmentitem
- Map item the file is attached topublic SendDialog build()
SendDialog
public SendDialog show()
SendDialog