Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
Android Documentation
LockScreenConfig

Class LockScreenConfig

Hierarchy

java.lang.Object

Package
com.smartdevicelink.managers.lockscreen

Overview

LockScreenConfig

This is set during SdlManager instantiation.

  • enable - if false, don't worry about the other parameters. You are responsible for creating and managing a lockscreen. If true, also set the backgroundColor and appIcon if you want. If you don't set the backgroundColor or appIcon, it will use the defaults.
  • backgroundColor - if using the default lockscreen, you can set this to a color of your choosing
  • appIcon - if using the default lockscreen, you can set your own app icon
  • customView - If you would like to provide your own view, you can pass it in here.
  • deviceLogo - On by default. If available, will show the device or OEMs logo on the lockscreen
  • displayMode - Describes when the lock screen will be displayed. Defaults to `DISPLAY_MODE_REQUIRED_ONLY`.
  • enableDismissGesture - If true, then the lock screen can be dismissed with a downward swipe on compatible head units. Requires a connection of SDL 6.0+ and the head unit to enable the feature. Defaults to true.
  • Fields

    DISPLAY_MODE_NEVER

    public static final int DISPLAY_MODE_NEVER
    

    DISPLAY_MODE_REQUIRED_ONLY

    public static final int DISPLAY_MODE_REQUIRED_ONLY
    
    Constant Value
    1

    DISPLAY_MODE_OPTIONAL_OR_REQUIRED

    public static final int DISPLAY_MODE_OPTIONAL_OR_REQUIRED
    
    Constant Value
    2

    DISPLAY_MODE_ALWAYS

    public static final int DISPLAY_MODE_ALWAYS
    
    Constant Value
    3

    Constructors

    LockScreenConfig()

    public LockScreenConfig()
    

    Methods

    setBackgroundColor( int resourceColor )

    Set the resource int of the background color. Colors should define colors in your Colors.xml file

    public void setBackgroundColor(int resourceColor)
    

    Method Parameters

    resourceColor
    resource int of the color

    getBackgroundColor()

    Gets the int reference to the custom lock screen background color

    public int getBackgroundColor()
    

    setAppIcon( int appIconInt )

    int of the drawable icon.

    public void setAppIcon(int appIconInt)
    

    Method Parameters

    appIconInt
    the drawable of the icon to be displayed on the lock screen

    getAppIcon()

    Gets the resource reference of the icon to be displayed on the lock screen

    public int getAppIcon()
    

    setCustomView( int customViewInt )

    Sets the reference to the custom layout to be used for the lock screen
    If set, the color and icon setters will be ignored

    public void setCustomView(int customViewInt)
    

    Method Parameters

    customViewInt
    the layout

    getCustomView()

    Gets the reference to the custom lockscreen layout to be used

    public int getCustomView()
    

    Whether or not to show the device's logo on the default lock screen
    The logo will come from the connected hardware, if set by the manufacturer
    If using a Custom View, this will be ignored.

    public void showDeviceLogo(boolean deviceLogo)
    

    Method Parameters

    deviceLogo
    - boolean

    isDeviceLogoEnabled()

    Get whether or not the device's Logo is shown on the default lock screen
    The logo will come from the connected hardware, if set by the manufacturer

    public boolean isDeviceLogoEnabled()
    

    setDisplayMode( int displayMode )

    Set the displayMode to be used

    public void setDisplayMode(int displayMode)
    

    Method Parameters

    displayMode
    - Describes when the lock screen will be displayed. Defaults to `DISPLAY_MODE_REQUIRED_ONLY`.

    getDisplayMode()

    Get the displayMode to be used

    public int getDisplayMode()
    

    enableDismissGesture( boolean enableDismissGesture )

    If true, then the lock screen can be dismissed with a downward swipe on compatible head units. Requires a connection of SDL 6.0+ and the head unit to enable the feature. Defaults to true.

    public void enableDismissGesture(boolean enableDismissGesture)
    

    Method Parameters

    enableDismissGesture
    - enable or disable this feature

    enableDismissGesture()

    If true, then the lock screen can be dismissed with a downward swipe on compatible head units. Requires a connection of SDL 6.0+ and the head unit to enable the feature. Defaults to true.

    public boolean enableDismissGesture()
    

    Inherited Methods

    From Class Methods
    java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
    View on GitHub.com
    Previous Section Next Section