public class SmartcarAuth.AuthUrlBuilder
extends java.lang.Object
Constructor and Description |
---|
AuthUrlBuilder() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
build()
Build a Smartcar Connect authorization url.
|
SmartcarAuth.AuthUrlBuilder |
setFlags(java.lang.String[] flags)
Enable early access features.
|
SmartcarAuth.AuthUrlBuilder |
setForcePrompt(boolean forcePrompt)
Force display of the grant approval dialog in Smartcar Connect.
|
SmartcarAuth.AuthUrlBuilder |
setMakeBypass(java.lang.String make)
Bypass the brand selector screen to a specified make.
|
SmartcarAuth.AuthUrlBuilder |
setSingleSelect(boolean singleSelect)
Ensure the user only authorizes a single vehicle.
|
SmartcarAuth.AuthUrlBuilder |
setSingleSelectVin(java.lang.String vin)
Specify the vin a user can authorize in Smartcar Connect.
|
SmartcarAuth.AuthUrlBuilder |
setState(java.lang.String state)
Set an optional state parameter.
|
SmartcarAuth.AuthUrlBuilder |
setUser(java.lang.String user)
Specify a unique identifier for the vehicle owner to track their progress through
Smartcar Connect.
|
public SmartcarAuth.AuthUrlBuilder setState(java.lang.String state)
state
- An optional value included on the SmartcarResponse
object returned
to the SmartcarCallback
public SmartcarAuth.AuthUrlBuilder setForcePrompt(boolean forcePrompt)
forcePrompt
- Set to true to ensure the grant approval dialog is always shownpublic SmartcarAuth.AuthUrlBuilder setMakeBypass(java.lang.String make)
make
- The selected makepublic SmartcarAuth.AuthUrlBuilder setSingleSelect(boolean singleSelect)
singleSelect
- Set to true to ensure only a single vehicle is authorizedpublic SmartcarAuth.AuthUrlBuilder setSingleSelectVin(java.lang.String vin)
setSingleSelect(boolean)
is set to true, this parameter
can be used to ensure that Smartcar Connect will allow the user to authorize only the
vehicle with a specific VIN.vin
- The specific VIN to authorizepublic SmartcarAuth.AuthUrlBuilder setFlags(java.lang.String[] flags)
flags
- List of feature flags that your application has early access to.public SmartcarAuth.AuthUrlBuilder setUser(java.lang.String user)
user
- An optional unique identifier for a vehicle owner. This identifier is used to aggregate
analytics across Connect sessions for each vehicle owner.public java.lang.String build()
SmartcarAuth.launchAuthFlow(Context, String)
or SmartcarAuth.addClickHandler(Context, View, String)