public class LNGeoIntentBuilder extends IntentBuilder
LBGeoIntentBuilder builder = new LBGeoIntentBuilder(new Intent());
builder.setLocation("51.1|7.2"); // set the target location for the intent
builder.setName("LOGIBALL"); // set an optional name for the location
builder.setText("Navigation started to: LOGIBALL"); // set an optional text to inform the user what is happening
builder.setAppStateValue(GeoIntentAppState.INTENT_NAV); // what should the localion navigator do with this location
builder.setNavigationDelayValue(2000); // delay with which to start the navigation
builder.setDialogDelayValue(2000); // duration the optionalText is visible in a dialog
builder.setResponsibilityDialog(true); // set whether or not to show the responsibility information to the user on startup with this intent
// after the navigation is finished an answer should be send:
builder.setDestinationActionValue(DestinationAction.PERFORM_ACTION);
builder.setDestinationIntent(pendingIntent); // set the pending intent that should be executed
// sign in the user (will only be done if they are not already signed in with the given user):
builder.setLoginCredentials("MaxMustermann", "EinPassword");
builder.setsetIntentTarget(true); // set target to the store version (default is targeting the non-play-store navigator)
Intent intent = builder.build();
intent| Constructor and Description |
|---|
LNGeoIntentBuilder(android.content.Intent intent)
Construct the builder
|
| Modifier and Type | Method and Description |
|---|---|
android.content.Intent |
build()
Constructs the intent with the specific parameters set
|
LNGeoIntentBuilder |
setAppStateValue(GeoIntentAppState appState)
Set the state that the app will be brought to.
|
LNGeoIntentBuilder |
setDestinationActionValue(int destinationActionValue)
Optionally set the action to perform when the final destination was reached.
|
LNGeoIntentBuilder |
setDestinationIntent(android.app.PendingIntent pendingIntent)
Set the pending intent to execute when the final destination was reached.
|
LNGeoIntentBuilder |
setDialogDelayValue(int dialogDelayValue)
Sets the delay until the dialog with the given text is hidden, in ms.
|
LNGeoIntentBuilder |
setLocation(java.lang.String location)
Set the location that will be shown.
|
LNGeoIntentBuilder |
setName(java.lang.String text)
Set the name that will be displayed in destination, routing and navigation view.
|
LNGeoIntentBuilder |
setNavigationDelayValue(int navigationDelayValue)
Sets the delay, until the navigation is started, in ms.
|
LNGeoIntentBuilder |
setResponsibilityDialog(boolean responsibilityDialog)
Set if the responsibility screen should be displayed, IF the user did not mark the dialog to never be shown again.
|
LNGeoIntentBuilder |
setRoutingWithSpecialRights(boolean useSpecialRights)
Set if the route should be calculated with special rights active.
|
LNGeoIntentBuilder |
setText(java.lang.String text)
Set the text that will be displayed in a dialog
|
LNGeoIntentBuilder |
setZoomLevel(int zoomLevel)
Optionally set the zoom level from 0 (whole world) to 21 (most detailed street level).
|
getPackage, setIntentTarget, setLoginCredentialspublic LNGeoIntentBuilder(android.content.Intent intent)
intent - the intent that should be modified, should not have anything set before passing to thispublic LNGeoIntentBuilder setLocation(java.lang.String location)
location - The locationpublic LNGeoIntentBuilder setName(java.lang.String text)
GeoIntentAppState.INTENT_DESTINATION, GeoIntentAppState.INTENT_ROUTE,
GeoIntentAppState.INTENT_NAV, GeoIntentAppState.INTENT_NAV, GeoIntentAppState.INTENT_NAV_DELAY,
GeoIntentAppState.INTENT_NAV_DEMO, GeoIntentAppState.INTENT_NAV_DEMO_DELAYtext - The name to be shown for the specific location.public LNGeoIntentBuilder setText(java.lang.String text)
text - The text to be shownpublic LNGeoIntentBuilder setZoomLevel(int zoomLevel)
setAppStateValue(GeoIntentAppState) called with:
zoomLevel - The zoom level from 0 (whole world) to 21 (most detailed street level).
Use -1 to ignore the valuepublic LNGeoIntentBuilder setAppStateValue(GeoIntentAppState appState)
appState - The app statepublic LNGeoIntentBuilder setDestinationActionValue(int destinationActionValue)
DestinationAction.
Default: DestinationAction.LEAVE_NAVIGATIONdestinationActionValue - The valuepublic LNGeoIntentBuilder setDestinationIntent(android.app.PendingIntent pendingIntent)
setDestinationActionValue(int) must be called with one of:
for this to have an effect.pendingIntent - The intent to executepublic LNGeoIntentBuilder setNavigationDelayValue(int navigationDelayValue)
setAppStateValue(GeoIntentAppState) called with one of:
navigationDelayValue - The delay until navigation is started in ms.public LNGeoIntentBuilder setDialogDelayValue(int dialogDelayValue)
setText(String)dialogDelayValue - The delay in ms.public LNGeoIntentBuilder setResponsibilityDialog(boolean responsibilityDialog)
responsibilityDialog - True to display the screen.public LNGeoIntentBuilder setRoutingWithSpecialRights(boolean useSpecialRights)
GeoIntentAppState.INTENT_ROUTE, GeoIntentAppState.INTENT_NAV, GeoIntentAppState.INTENT_NAV_DEMO, GeoIntentAppState.INTENT_NAV_DELAY, GeoIntentAppState.INTENT_NAV_DEMO_DELAYuseSpecialRights - True if the route should be calculated with special rightspublic android.content.Intent build()
IntentBuilderbuild in class IntentBuilder