Skip to main content
Version: 5.5

Release notes

This page provides the release notes of PlanetKit 5.5 for Android.

PlanetKit 5.5.2

Release date: 2025-02-26

Fix occasional crash that occurred in specific situations

  • Fixed an occasional crash that occurred on certain devices immediately after enabling airplane mode during a call.

Adjust audio mode for ringtone playback in 1-to-1 calls

  • Fixed an issue where the ringtone volume was too low on certain devices when receiving a call.

PlanetKit 5.5.1

Release date: 2025-01-15

Provide PlanetKitPluginProviderVirtualBackground as a plugin

Starting from version 5.5.1, the PlanetKitPluginProviderVirtualBackground class is now provided as a separate plugin. This change was made to minimize APK size for users who do not utilize the virtual background functionality.

API

Changed
  • PlanetKitPluginProviderVirtualBackground class 1-to-1 callGroup call
    • Removed PlanetKitPluginProviderVirtualBackground in planetkit
    • Added PlanetKitPluginProviderVirtualBackground in plugin-virtualbackground

Migration

How to use PlanetKitPluginProviderVirtualBackground
  • Add dependency in your build.gradle.

    implementation ('com.linecorp.planetkit:plugin-virtualbackground:1.0.0') {
    exclude group: 'com.linecorp.planetkit', module: 'planetkit'
    }
  • Apply the plugin.

    val plugin = PlanetKitPluginProviderVirtualBackground.getPlugin()
    PlanetKit.getCameraManager().setVirtualBackgroundPlugin(plugin)

Remove the thumbnail resolution option from PlanetKitCameraResolution

The thumbnail resolution option has been removed from the PlanetKitCameraResolution enum class. This resolution is no longer supported, and the selection of available resolutions has been simplified.

API

Removed
  • PlanetKitCameraResolution enum class 1-to-1 callGroup call
    • THUMBNAIL

Fix an issue with delay in initiating voice transmission at the start of a call

Fixed an issue where there was a 500ms delay in initiating the transmission of the local user's voice at the start of 1-to-1 calls and group calls.

Reflect SDK changes for Flutter support

Added code for PlanetKit Flutter support within the SDK.

PlanetKit 5.5.0

Release date: 2024-12-09

Replace CameraVideoSource with PlanetKitCameraManager and PlanetKitPluginVirtualBackground

  • The PlanetKitCameraManager interface provides a set of methods and properties for managing camera operations within the PlanetKit. It encapsulates the camera functionalities provided by PlanetKit, allowing for configuration of camera settings and subscription to state change events.
  • Changes to the camera device control policy
    • Starting with PlanetKit 5.5, the camera device is turned on when at least one of the following conditions is met, and it is turned off when none of these conditions are satisfied:
      • There is at least one PlanetKitVideoView rendering a preview via PlanetKitCameraManager.startPreview().
      • A PlanetKitCall or PlanetKitConference is connected, and PlanetKitMyMediaStatus.myVideoStatus.videoState is ENABLED.
  • The PlanetKitPluginVirtualBackground interface provides a set of methods for virtual background functionality.

API

Changed
  • PlanetKit object 1-to-1 callGroup call

    PreviousPlanetKit 5.5.0
    fun getDefaultCameraVideoSource(): CameraVideoSourcefun getCameraManager(): PlanetKitCameraManager
Added
  • PlanetKitCameraManager interface 1-to-1 callGroup call
    • val resolution: PlanetKitCameraResolution
    • var cameraType: PlanetKitCameraType
    • val isStarted: Boolean
    • val fps: Int
    • fun setStateListener(listener: StateListener?)
    • fun setManualResolution(resolution: PlanetKitCameraResolution)
    • fun setDefaultResolution()
    • fun setVirtualBackgroundPlugin(plugin: PlanetKitPluginVirtualBackground) :Boolean
    • fun addCameraTypeChangedListener(listener: CameraTypeChangedListener)
    • fun removeCameraTypeChangedListener(listener: CameraTypeChangedListener)
    • fun setVideoSourceInterceptor(interceptor: PlanetKitVideoInterceptor?)
    • fun startPreview(view: PlanetKitVideoView): Boolean
    • fun stopPreview(view: PlanetKitVideoView): Boolean
    • fun enableDumpFrame(enable: Boolean)
  • PlanetKitCameraManager.StateListener interface 1-to-1 callGroup call
    • fun onStart()
    • fun onStop()
    • fun onError(@ErrorCode code: Int)
  • PlanetKitCameraManager.CameraTypeChangedListener interface 1-to-1 callGroup call
    • fun onChanged(isFrontCamera: Boolean)
  • PlanetKitPluginVirtualBackground interface 1-to-1 callGroup call
    • fun getCurrentVirtualBackgroundType(): VirtualBackgroundType
    • fun setVirtualBackgroundWithBlur(@IntRange(from = 1, to = 25) radius: Int)
    • fun setVirtualBackgroundWithImage(inputImage: Bitmap)
    • fun clearVirtualBackground()
  • PlanetKitCameraResolution enum class 1-to-1 callGroup call
    • THUMBNAIL(1)
    • QVGA(2)
    • VGA(3)
    • HD(4)
  • PlanetKitPluginVirtualBackground.VirtualBackgroundType enum class 1-to-1 callGroup call
    • NONE(0)
    • BLUR(1)
    • IMAGE(2)
  • PlanetKitPluginProviderVirtualBackground class 1-to-1 callGroup call
    • fun getPlugin(): PlanetKitPluginVirtualBackground
Removed
  • CameraVideoSource class 1-to-1 callGroup call

Migration

How to obtain the class
  • The handling of camera properties in the previous version is as follows.

    fun userFunction() {
    PlanetKit.getDefaultCameraVideoSource().cameraType = PlanetKitCameraType.FRONT
    //...
    }
  • Beginning with version 5.5, the handling of camera properties is as follows.

    fun userFunction() {
    PlanetKit.getCameraManager().cameraType = PlanetKitCameraType.FRONT
    //...
    }
How to use camera preview
  • The handling of camera preview in the previous version is as follows.

    val isCameraUsedByAnotherClass: Boolean

    fun startRenderPreviewOnMyVideoView(view: PlanetKitVideoView) {
    PlanetKit.getDefaultCameraVideoSource().addMyVideoView(view)
    if (!PlanetKit.getDefaultCameraVideoSource()) {
    PlanetKit.getDefaultCameraVideoSource().start()
    }
    }

    fun stopRenderPreviewOnMyVideoView(view: PlanetKitVideoView) {
    PlanetKit.getDefaultCameraVideoSource().removeMyVideoView(view)

    /* Check If Camera should be stopped */
    if (isCameraUsedByAnotherClass == false) {
    PlanetKit.getDefaultCameraVideoSource().stop()
    }
    }
  • Beginning with version 5.5, the handling of camera preview is as follows.

    fun startRenderPreviewOnMyVideoView(view: PlanetKitVideoView) {
    PlanetKit.getCameraManager().startPreview(view)
    }

    fun stopRenderPreviewOnMyVideoView(view: PlanetKitVideoView) {
    PlanetKit.getCameraManager().stopPreview(view)
    }
How to set virtual background
  • The handling of virtual background in the previous version is as follows.

    fun virtualBackground() {
    /* If you want to set VirtualBackground as Blur */
    PlanetKit.getDefaultCameraVideoSource().setVirtualBackgroundWithBlur(10)

    /* If you want to clear VirtualBackground */
    PlanetKit.getDefaultCameraVideoSource().clearVirtualBackground()
    }
  • Beginning with version 5.5, the handling of virtual background is as follows.

    fun virtualBackground() {
    val plugin = PlanetKitPluginProviderVirtualBackground.getPlugin()
    PlanetKit.getCameraManager().setVirtualBackgroundPlugin(plugin)

    /* If you want to set VirtualBackground as Blur */
    plugin.setVirtualBackgroundWithBlur(10)

    /* If you want to clear VirtualBackground */
    plugin.clearVirtualBackground()
    }

Add PlanetKitInitialMyVideoState

  • PlanetKitInitialMyVideoState is an enum class added to determine the state of the local user's video when a video call is activated.
  • The default value for a property or parameter of type PlanetKitInitialMyVideoState is PlanetKitInitialMyVideoState.RESUME.

API

Changed
  • PlanetKitCall interface 1-to-1 call

    PreviousPlanetKit 5.5.0
    fun acceptCall(listener: AcceptCallListener, useResponderPreparation: Boolean = false, recordOnCloud: Boolean = false)fun acceptCall(listener: AcceptCallListener, initialMyVideoState: PlanetKitInitialMyVideoState = PlanetKitInitialMyVideoState.RESUME, useResponderPreparation: Boolean = false, recordOnCloud: Boolean = false)
    fun acceptCall(listener: AcceptCallListener, callStartMessage: PlanetKitCallStartMessage, useResponderPreparation: Boolean = false, recordOnCloud: Boolean = false)fun acceptCall(listener: AcceptCallListener, callStartMessage: PlanetKitCallStartMessage, initialMyVideoState: PlanetKitInitialMyVideoState = PlanetKitInitialMyVideoState.RESUME, useResponderPreparation: Boolean = false, recordOnCloud: Boolean = false)
    fun enableVideo(userData: Any? = null, callback: PlanetKitRequestCallback? = null): Booleanfun enableVideo(initialMyVideoState: PlanetKitInitialMyVideoState = PlanetKitInitialMyVideoState.RESUME, userData: Any? = null, callback: PlanetKitRequestCallback? = null): Boolean
  • PlanetKitConference interface Group call

    PreviousPlanetKit 5.5.0
    fun enableVideo(userData: Any? = null, callback: PlanetKitRequestCallback? = null): Booleanfun enableVideo(initialMyVideoState: PlanetKitInitialMyVideoState = PlanetKitInitialMyVideoState.RESUME, userData: Any? = null, callback: PlanetKitRequestCallback? = null): Boolean
Added
  • PlanetKitInitialMyVideoState enum class 1-to-1 callGroup call
    • RESUME(0)
    • PAUSE(1)
  • PlanetKitMakeCallParam.Builder class 1-to-1 call
    • fun setInitialMyVideoState(value: PlanetKitInitialMyVideoState)
  • PlanetKitConferenceParam.Builder class Group call
    • fun setInitialMyVideoState(value: PlanetKitInitialMyVideoState)

Example code

  • Example code for 1-to-1 calls

    fun makeCall() {
    /* Make a video call with my video state set to PAUSE */
    val param = PlanetKitMakeCallParam.Builder()
    .mediaType(PlanetKitMediaType.AUDIOVIDEO)
    .setInitialMyVideoState(PlanetKitInitialMyVideoState.PAUSE)
    /* Set other parameters If you needed */
    .build()

    val result = PlanetKit.makeCall(param, makeAcceptCallListener)
    }

    val verifyListener = object: VerifyListener {
    override fun onVerified(call: PlanetKitCall,
    peerStartMessage: PlanetKitCallStartMessage?,
    peerUseResponderPreparation: Boolean) {
    /* For a video call, accept the call with my video state set to PAUSE */
    call.acceptCall(acceptCallListener, PlanetKitInitialMyVideoState.PAUSE)
    }
    }

    fun enableVideo() {
    /* Change a call type as video call with my video state set to PAUSE */
    call.enableVideo(PlanetKitInitialMyVideoState.PAUSE)
    }
  • Example code for group calls

    fun joinConference() {
    /* Join a video group call with my video state set to PAUSE */
    val param = PlanetKitConferenceParam.Builder()
    .mediaType(PlanetKitMediaType.AUDIOVIDEO)
    .setInitialMyVideoState(PlanetKitInitialMyVideoState.PAUSE)
    /* Set other parameters If you needed */
    .build()

    val result = PlanetKit.joinConference(param, conferenceListener)
    }

    fun enableVideo() {
    /* Change to video group call with my video state set to PAUSE */
    conference.enableVideo(PlanetKitInitialMyVideoState.PAUSE)
    }

Add the audio hooking feature

  • Audio hooking allows you to get the audio data before Planet Cloud transmits audio to a peer. This function can be used to modify the local user's voice or use the audio data for speech recognition.
  • For more information, see Audio hooking.

API

Added
  • PlanetKitHookedAudio class 1-to-1 call
    • val sampleRate: Int
    • val channel: Int
    • val sampleType: PlanetKitAudioSampleType
    • val sampleCount: Int
    • val sequenceNumber: Long
    • fun setRawData(data: ByteArray)
    • fun getRawData(): ByteArray
  • PlanetKitCall class 1-to-1 call
    • fun enableHookMyAudio(listener: PlanetKitHookMyAudioListener, userData: Any? = null, callback: PlanetKitRequestCallback? = null): Boolean
    • fun disableHookMyAudio(userData: Any? = null, callback: PlanetKitRequestCallback? = null): Boolean
    • fun putHookedMyAudioBack(audioData: PlanetKitHookedAudio): Boolean

Replace VideoSource with PlanetKitCustomVideoSource for custom video source

  • The existing VideoSource made it difficult for users to customize and integrate the custom video source into 1-to-1 call or group call sessions as necessary. To address this issue, we have introduced PlanetKitCustomVideoSource, which can be used for customization.
  • For more information, see Custom video source.

API

Changed
  • PlanetKitCall interface 1-to-1 call

    PreviousPlanetKit 5.5.0
    fun setVideoSource(videoSource: VideoSource?)fun setVideoSource(videoSource: PlanetKitCustomVideoSource), fun clearVideoSource()
  • PlanetKitConference interface Group call

    PreviousPlanetKit 5.5.0
    fun setVideoSource(videoSource: VideoSource?)fun setVideoSource(videoSource: PlanetKitCustomVideoSource), fun clearVideoSource()
Added
  • PlanetKitCustomVideoSource abstract class 1-to-1 callGroup call
    • var maxFps: Int? = null
    • fun addMyVideoView(view: PlanetKitVideoView)
    • fun removeMyVideoView(view: PlanetKitVideoView)
    • protected fun postFrameData(frameData: FrameData): Boolean
    • protected fun postingFrameDataAvailable(): Boolean
    • abstract fun onMaxFpsLimitUpdated(isLimitEnabled: Boolean, maxFps: Int)
  • PlanetKitCustomVideoSource.FrameData abstract class 1-to-1 callGroup call

Improve ScreenCapturerVideoSource

  • ScreenCapturerVideoSource previously exposed several unnecessary methods, causing confusion for users. It has been improved to expose only the essential methods.
  • Since the ScreenCapturerVideoSource no longer inherits from VideoSource, the methods previously provided by VideoSource have been removed.

API

Removed
  • ScreenCapturerVideoSource class 1-to-1 callGroup call
    • fun stop(reason: VideoSource.VideoSourceStopReason): Boolean
    • fun useDeviceRotation(): Boolean

Fix a typo in CallListener

API

Changed
  • CallListener class 1-to-1 call

    PreviousPlanetKit 5.5.0
    fun onPeerOnHold(call: PlanetKitCall, reason: String?)fun onPeerHold(call: PlanetKitCall, reason: String?)

Remove meaningless API PlanetKitCall.reject()

  • Even when rejecting an incoming call, you should use the function endCall() instead of reject(), so reject() has been removed.

API

Removed
  • PlanetKitCall interface 1-to-1 call
    • fun reject()

Add a disconnect reason for screen lock

  • This disconnect reason occurs only on desktop systems (not applicable to Android) when the desktop screen is locked by the user or due to system inactivity. When the peer is using a desktop and the screen is locked, the call will end and you will receive this reason through an event.

API

Added
  • PlanetKitDisconnectReason enum class 1-to-1 callGroup call
    • DESKTOP_SCREEN_LOCKED(1314)