AndroidAuthSessionOptionsBuilder¶
Fluent builder for AndroidAuthSessionOptions. Options not configured use the system or browser default.
Kodster.InAppWebBrowser.Android.AndroidAuthSessionOptionsBuilder
Overview¶
Each With* method returns the same builder instance for fluent chaining. Call Build() to create the final AndroidAuthSessionOptions object.
Example¶
#if UNITY_ANDROID
var options = new AndroidAuthSessionOptionsBuilder()
.WithColorScheme(AndroidColorScheme.Dark)
.WithEphemeralBrowsingEnabled(true)
.Build();
var result = await AndroidAuthSession.StartAsync(url, redirectScheme, options);
#endif
Methods¶
WithColorScheme¶
Sets the color scheme used for the session UI.
Parameters
androidColorScheme(AndroidColorScheme): The color scheme to apply.
Returns
- The current
AndroidAuthSessionOptionsBuilderinstance.
WithLightColorSchemeOptions¶
public AndroidAuthSessionOptionsBuilder WithLightColorSchemeOptions(
ColorSchemeOptions lightColorSchemeOptions
)
Sets the color customization applied when the session is in light mode.
Parameters
lightColorSchemeOptions(ColorSchemeOptions): Color overrides for light mode.
Returns
- The current
AndroidAuthSessionOptionsBuilderinstance.
WithDarkColorSchemeOptions¶
public AndroidAuthSessionOptionsBuilder WithDarkColorSchemeOptions(
ColorSchemeOptions darkColorSchemeOptions
)
Sets the color customization applied when the session is in dark mode.
Parameters
darkColorSchemeOptions(ColorSchemeOptions): Color overrides for dark mode.
Returns
- The current
AndroidAuthSessionOptionsBuilderinstance.
WithDefaultColorSchemeOptions¶
public AndroidAuthSessionOptionsBuilder WithDefaultColorSchemeOptions(
ColorSchemeOptions defaultColorSchemeOptions
)
Sets the fallback color customization used when no mode-specific options are matched.
Parameters
defaultColorSchemeOptions(ColorSchemeOptions): Fallback color overrides.
Returns
- The current
AndroidAuthSessionOptionsBuilderinstance.
WithEphemeralBrowsingEnabled¶
public AndroidAuthSessionOptionsBuilder WithEphemeralBrowsingEnabled(
bool ephemeralBrowsingEnabled
)
Sets whether the session clears cookies and browsing data when closed.
Parameters
ephemeralBrowsingEnabled(bool):trueto enable ephemeral browsing; otherwisefalse.
Returns
- The current
AndroidAuthSessionOptionsBuilderinstance.
WithCloseButtonIcon¶
Sets the icon displayed on the close button.
Parameters
closeButtonIcon(CloseButtonIcon): The icon style to use.
Returns
- The current
AndroidAuthSessionOptionsBuilderinstance.
Build¶
Builds and returns an AndroidAuthSessionOptions instance from the current configuration. Only options explicitly set via the With* methods are included; unset options remain null.
Returns
- A new
AndroidAuthSessionOptionsinstance reflecting the builder's current state.