public class LNTourIntentBuilder extends IntentBuilder
setTourStations(String) or setTourPath(String)
LBTourIntentBuilder builder = new LBTourIntentBuilder(new Intent());
builder.setTourStations("51.2|7.1&&&50.0|7.0&&&49.3|7.2"); // the tour stations of the new tour
builder.setName("Somewhere&&&SomewhereElse&&&TheHinterlands"); // the names that should be displayed for the stations
builder.setText("This is your next tour. Have fun driving!"); // the text to display as an information to the user
builder.setDialogDelayValue(2000); // hide the dialog after 2 seconds
builder.setResponsibilityDialog(true); // show the responsibility screen
builder.setIntentTarget(null); // show the choose app dialog if more than one app can handle the action
Intent intent = builder.build();
intent| Constructor and Description |
|---|
LNTourIntentBuilder(android.content.Intent intent)
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
android.content.Intent |
build()
Constructs the intent with the specific parameters set
|
LNTourIntentBuilder |
setAppStateValue(TourIntentAppState appState)
Set the state that the app will be brought to.
|
LNTourIntentBuilder |
setDialogDelayValue(int dialogDelayValue)
Sets the delay until the dialog with the given text is hidden, in ms.
|
LNTourIntentBuilder |
setIncludeCurrentPosition(boolean includeCurrentPosition)
Set if the current position should be included for the optimization calculation
|
LNTourIntentBuilder |
setName(java.lang.String names)
Sets the tour station names that will be displayed in destination, routing and navigation view.
|
LNTourIntentBuilder |
setOptimizationReceiver(java.lang.String receiver)
Set if an optimized tour should be returned to a specific app.
|
LNTourIntentBuilder |
setOptimizeLastStation(boolean optimizeLastStation)
Set if the last station should be optimized as well
|
LNTourIntentBuilder |
setResponsibilityDialog(boolean responsibilityDialog)
Set whether the responsibility dialog should be displayed, IF the user did not mark the dialog to never be shown again.
|
LNTourIntentBuilder |
setRoutingWithSpecialRights(boolean useSpecialRights)
Set if the route should be calculated with special rights active.
|
LNTourIntentBuilder |
setText(java.lang.String text)
Set the text that will be displayed in a dialog
|
LNTourIntentBuilder |
setTourPath(java.lang.String tourPath)
Deprecated.
Use
setTourUri(Uri) or setTourUriAndGrantPermission(Uri, Activity) instead |
LNTourIntentBuilder |
setTourStations(java.lang.String stations)
Set the list of concatenated tour stations.
|
LNTourIntentBuilder |
setTourUri(android.net.Uri tourUri)
Set the uri of a tour file.
|
LNTourIntentBuilder |
setTourUriAndGrantPermission(android.net.Uri tourUri,
android.app.Activity activity)
Set the uri of a tour file and grants the navigator the permission to read this file
|
getPackage, setIntentTarget, setLoginCredentialspublic LNTourIntentBuilder(android.content.Intent intent)
intent - the intent that should be modified, should not have anything set before passing to thispublic LNTourIntentBuilder setTourStations(java.lang.String stations)
stations - The concatenated tour stations with IntentConstants.SEPARATOR@Deprecated public LNTourIntentBuilder setTourPath(java.lang.String tourPath)
setTourUri(Uri) or setTourUriAndGrantPermission(Uri, Activity) insteadtourPath - The location of the tour file. The tour intent needs concatenated coordinates with IntentConstants.SEPARATORpublic LNTourIntentBuilder setTourUri(android.net.Uri tourUri)
setTourUriAndGrantPermission(Uri, Activity) insteadtourUri - The uri of the tour to loadpublic LNTourIntentBuilder setTourUriAndGrantPermission(android.net.Uri tourUri, android.app.Activity activity)
tourUri - The uri of the tour to loadactivity - The activity instance that is required to grant the navigator the permission to read the tour filepublic LNTourIntentBuilder setName(java.lang.String names)
names - The list of tour station names to be shown. Separated with IntentConstants.SEPARATOR.
The first name will be used for the first station, the second name for the second station, etc.public LNTourIntentBuilder setText(java.lang.String text)
text - The text to be shownpublic LNTourIntentBuilder setAppStateValue(TourIntentAppState appState)
appState - The app state to setpublic LNTourIntentBuilder setDialogDelayValue(int dialogDelayValue)
setText(String)dialogDelayValue - The delay in ms.public LNTourIntentBuilder setResponsibilityDialog(boolean responsibilityDialog)
responsibilityDialog - True to display the dialog.public LNTourIntentBuilder setIncludeCurrentPosition(boolean includeCurrentPosition)
includeCurrentPosition - True to include the current position for the optimization calculationpublic LNTourIntentBuilder setOptimizeLastStation(boolean optimizeLastStation)
optimizeLastStation - True to optimize the last station as well. If unset, the last station is fix and will be kept as last stationpublic LNTourIntentBuilder setOptimizationReceiver(java.lang.String receiver)
receiver - The package id of the application that should receive the optimized tourpublic LNTourIntentBuilder setRoutingWithSpecialRights(boolean useSpecialRights)
TourIntentAppState.INTENT_TOUR_CREATED, TourIntentAppState.INTENT_TOUR_IMPORTEDuseSpecialRights - True if the route should be calculated with special rightspublic android.content.Intent build()
IntentBuilderbuild in class IntentBuilder