Volumedeck

class Volumedeck @JvmOverloads constructor(activity: Activity, autoStart: Boolean = true, var locationServicesStatusChange: (Boolean) -> Unit? = null, var onLocationUpdate: (speed: Float, volume: Float) -> Unit? = null, var onStart: () -> Unit? = null, var onStop: () -> Unit? = null, activationKey: String? = null, runInBackground: Boolean = false, showStopButtonInNotification: Boolean = false, notificationTitle: String? = null, notificationSubtitle: String? = null, notificationStopButtonText: String? = null, notificationIcon: Int? = null)

Volumedeck provides automatic volume adjustment based on GPS speed, improving the media-listening experience for users in vehicles and public transport.

Constructors

Link copied to clipboard
constructor(activity: Activity, autoStart: Boolean = true, locationServicesStatusChange: (Boolean) -> Unit? = null, onLocationUpdate: (speed: Float, volume: Float) -> Unit? = null, onStart: () -> Unit? = null, onStop: () -> Unit? = null, activationKey: String? = null, runInBackground: Boolean = false, showStopButtonInNotification: Boolean = false, notificationTitle: String? = null, notificationSubtitle: String? = null, notificationStopButtonText: String? = null, notificationIcon: Int? = null)

Properties

Link copied to clipboard

Callback function to be called when location status changes.

Link copied to clipboard
var onLocationUpdate: (speed: Float, volume: Float) -> Unit?

Callback function to be called when location is updated.

Link copied to clipboard
var onStart: () -> Unit?

Callback function to be called when Volumedeck starts.

Link copied to clipboard
var onStop: () -> Unit?

Callback function to be called when Volumedeck stops.

Functions

Link copied to clipboard
fun setMockSpeed(context: Context, speed: Float)

Mocks the speed for Volumedeck.

Link copied to clipboard
fun setUniversalVolumeInstance(universalVolume: UniversalVolume)
Link copied to clipboard
fun start()

Starts Volumedeck.

Link copied to clipboard
fun stop()

Stops Volumedeck.