public class InsertTargetIntentBuilder extends IntentBuilder
intent| Constructor and Description |
|---|
InsertTargetIntentBuilder(android.content.Intent intent)
Constructor for the builder
|
| Modifier and Type | Method and Description |
|---|---|
android.content.Intent |
build()
Constructs the intent with the specific parameters set
|
InsertTargetIntentBuilder |
setAddAsNextTarget(boolean addAsNextTarget)
Set whether the target should be added as the next or the last target.
|
InsertTargetIntentBuilder |
setAnswerIntent(android.app.PendingIntent answerIntent)
Set an intent that will be used by the Navigator to tell the sender of the build intent whether the addition was successful.
|
InsertTargetIntentBuilder |
setName(java.lang.String name)
Sets the custom name of the target location to insert
|
InsertTargetIntentBuilder |
setRequiresUsersAcceptance(boolean requiresUsersAcceptance)
Set whether the user should be asked if they want to add the target to their tour.
|
InsertTargetIntentBuilder |
setTarget(double latitude,
double longitude)
Set the target to be inserted.
|
InsertTargetIntentBuilder |
setTarget(java.lang.String target)
Set the target that should be inserted.
|
InsertTargetIntentBuilder |
setTarget(java.lang.String latitude,
java.lang.String longitude)
Set the target to be inserted.
|
getPackage, setIntentTarget, setLoginCredentialspublic InsertTargetIntentBuilder(android.content.Intent intent)
intent - the intent to modifypublic InsertTargetIntentBuilder setTarget(java.lang.String target)
IntentConstants.SEPARATORtarget - The target to insertedpublic InsertTargetIntentBuilder setTarget(double latitude, double longitude)
latitude - The latitude of the coordinatelongitude - The longitude of the coordinatepublic InsertTargetIntentBuilder setTarget(java.lang.String latitude, java.lang.String longitude)
latitude - The latitude of the coordinatelongitude - The longitude of the coordinatepublic InsertTargetIntentBuilder setName(java.lang.String name)
name - The custom names of the target location to insertpublic InsertTargetIntentBuilder setAddAsNextTarget(boolean addAsNextTarget)
addAsNextTarget - True to add as the next targetpublic InsertTargetIntentBuilder setRequiresUsersAcceptance(boolean requiresUsersAcceptance)
requiresUsersAcceptance - True if the user should be askedpublic InsertTargetIntentBuilder setAnswerIntent(android.app.PendingIntent answerIntent)
IntentConstants.INSERT_TARGET_RESULT_EXTRA.
On the other hand the Navigator is not guaranteed to set any attributes that will allow the handler of the PendingIntent to identify which target was tried to add.
If you want to keep the navigator displayed it is advised to use a broadcast pending intent.answerIntent - the pending intent that will be used to propagate, whether the addition was successfulpublic android.content.Intent build()
IntentBuilderbuild in class IntentBuilder