Skip to main content
Version: 6.0

Release notes

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

PlanetKit 6.0

Release date: 2025-05-16

Upgrade Android OS Version to Android 15 (API Level 35)

  • PlanetKit now targets Android 15 (API Level 35).
  • Note: Your application can still use a target SDK version (targetSdkVersion) lower than API Level 35.

API

  • No changes

Control the microphone device based on microphone usage during a call

  • When the microphone is not in use during a call (e.g., mute or hold), PlanetKit turns off the microphone device.
  • PlanetKit provides two methods for microphone control. You can select the desired method via setMicMuteControlMethod. The default is AUDIO_MANAGER.
  • For more information, please refer to the API documentation.

API

Added
  • PlanetKitMicMuteControlMethod enum class 1-to-1 callGroup call
    • AUDIO_MANAGER
    • AUDIO_DRIVER
  • PlanetKitVerifyCallParam.Builder class 1-to-1 call
    • fun setMicMuteControlMethod(value: PlanetKitMicMuteControlMethod)
  • PlanetKitMakeCallParam.Builder class 1-to-1 call
    • fun setMicMuteControlMethod(value: PlanetKitMicMuteControlMethod)
  • PlanetKitConferenceParam.Builder class Group call
    • fun setMicMuteControlMethod(value: PlanetKitMicMuteControlMethod)

Replace AudioSource with PlanetKitCustomAudioSource for custom audio source

  • In previous versions, implementing a custom audio source required extending AudioSource, which was also used internally by PlanetKit and exposed a complex interface.
  • Starting from version PlanetKit 6.0, a new PlanetKitCustomAudioSource has been introduced to make custom audio source development easier and more streamlined. The original AudioSource has been deprecated.

API

Changed
  • PlanetKitCall interface 1-to-1 call

    PreviousPlanetKit 6.0.0
    fun setAudioSource(audioSource: AudioSource?)fun setCustomAudioSource(audioSource: PlanetKitCustomAudioSource)
  • PlanetKitConference interface Group call

    PreviousPlanetKit 6.0.0
    fun setAudioSource(audioSource: AudioSource?)fun setCustomAudioSource(audioSource: PlanetKitCustomAudioSource)
Added
  • PlanetKitCustomAudioSource class 1-to-1 call
  • PlanetKitCall interface 1-to-1 call
    • fun clearCustomAudioSource()
  • PlanetKitConference interface Group call
    • fun clearCustomAudioSource()
Removed
  • AudioSource class 1-to-1 call

Example code

  • Step 1: Implement a custom audio source class.

    object CustomAudioSource : PlanetKitCustomAudioSource() {
    private const val FRAME_DURATION_MS: Long = 20
    private var thread: Thread? = null
    fun start() {
    thread = Thread {
    while(true) {
    val frame: AudioFrame = makeYourAudioFrame()
    postFrameData(frame)
    Thread.sleep(FRAME_DURATION_MS)
    }
    }
    thread?.start()
    }
    fun stop() {
    thread?.interrupt()
    thread?.join()
    }
    }
  • Step 2: Set and start the custom audio source.

    fun setCustomAudioSource(call: PlanetKitCall, audioSource: CustomAudioSource) {
    call.setCustomAudioSource(audioSource)
    audioSource.start()
    }
  • Step 3: Clear and stop the custom audio source.

    fun clearCustomAudioSource(call: PlanetKitCall, audioSource: CustomAudioSource) {
    call.clearCustomAudioSource()
    audioSource.stop()
    }

Check cloud call recording activation during call reception using PlanetKitCCParam

  • Added a field to PlanetKitCCParam to indicate whether cloud call recording is activated when receiving a call.

API

Added
  • PlanetKitCCParam class 1-to-1 call
    • val isRecordOnCloudEnabled: Boolean

Remove the API to set the response type when the video call is enabled

  • When a video call is activated by the peer in a 1-to-1 audio call, the local user's video is always set to paused state.
    • In previous versions, you could use responseOnEnableVideo() to decide whether to automatically start sending the local user's video when the peer switched an audio call to a video call.
    • However, this API has been removed in version 6.0 due to privacy concerns and potential misuse, and onVideoEnabledByPeer has been changed to onVideoEnabledByPeerAndMyVideoPaused.
    • From version 6.0 onward, when a video call is enabled by the peer, the local user's video will remain paused.
  • If you previously relied on PlanetKitResponseOnEnableVideo.SEND, please update your implementation to manually resume video after receiving the onVideoEnabledByPeerAndMyVideoPaused event.
    • For more information, refer to the following example.

Example code

  • To replicate the behavior of the previous PlanetKitResponseOnEnableVideo.SEND setting, do as follows:
private val callListener = object: MakeCallListener, AcceptCallListener {
override fun onVideoEnabledByPeerAndMyVideoPaused(call: PlanetKitCall) {
...
call.resumeMyVideo()
}
}

API

Changed
  • CallListener class 1-to-1 call

    PreviousPlanetKit 6.0.0
    fun onVideoEnabledByPeer(call: PlanetKitCall)fun onVideoEnabledByPeerAndMyVideoPaused(call: PlanetKitCall)
Removed
  • PlanetKitResponseOnEnableVideo enum class 1-to-1 call
  • PlanetKitMakeCallParam.Builder class 1-to-1 call
    • fun responseOnEnableVideo(responseOnEnableVideo: PlanetKitResponseOnEnableVideo)
  • PlanetKitVerifyCallParam.Builder class 1-to-1 call
    • fun responseOnEnableVideo(responseOnEnableVideo: PlanetKitResponseOnEnableVideo)

Improve API for setting the volume of the peer

  • Replaced the previous subgroup-based volume control with a unified volume setting API for individual peers.
  • In versions prior to 6.0, volume was controlled per subgroup. Starting from version 6.0, volume can now be set independently of subgroups.
  • Due to this specification change, related API modifications have been made.

API

Changed
  • PlanetKitConferencePeer class Group call

    PreviousPlanetKit 6.0.0
    fun getAudioVolumeLevelSetting(subgroupName: String?): AudioVolumeResultfun getAudioVolumeLevelSetting(): AudioVolumeResult
Added
  • PlanetKitPeerControl class Group call
    • fun setVolumeLevelSetting(@IntRange(from = 0, to = 110) volumeLevel: Int, userData: Any? = null, callback: PlanetKitRequestCallback? = null): Boolean
  • PlanetKitPeerView class Group call
    • fun setVolumeLevelSetting(@IntRange(from = 0, to = 110) volumeLevel: Int, userData: Any? = null, callback: PlanetKitRequestCallback? = null): Boolean
Removed
  • PlanetKitSubgroup interface Group call
    • fun getPeerVolumeLevelSetting(user: PlanetKitUser): Int
  • PlanetKitSubgroupManager interface Group call
    • fun setPeerVolumeLevelSetting(peer: PlanetKitUser, subgroupName: String?, @IntRange(from = 0, to = 110) talkerVolume: Int, userData: Any?, callback: PlanetKitRequestCallback?): Boolean
    • fun setPeerVolumeLevelSetting(peer: PlanetKitUser, @IntRange(from = 0, to = 110) talkerVolume: Int, userData: Any?, callback: PlanetKitRequestCallback?): Boolean

Improve video capability configuration API

  • Thumbnail resolution can no longer be used in a video capability configuration API.
  • Video hardware codec settings are now configured through PlanetKit instead of setting them for each 1-to-1 call or group call individually.

API

Changed
  • PlanetKitVideoCapability class 1-to-1 callGroup call

    PreviousPlanetKit 6.0.0
    val maxResolution: PlanetKitVideoResolutionval maxResolution: PlanetKitVideoResolutionCapability
Added
  • PlanetKitVideoResolutionCapability enum class 1-to-1 callGroup call
    • QVGA(2)
    • VGA(3)
    • HD(4)
  • PlanetKitPreferredHardwareCodec data class 1-to-1 callGroup call
    • val callVideoSend: Boolean
    • val callVideoReceive: Boolean
    • val conferenceVideoSend: Boolean
    • val conferenceVideoReceive: Boolean
  • PlanetKit object 1-to-1 callGroup call
    • fun getCallDeviceDefaultVideoSendCapability(): PlanetKitVideoCapability?
    • fun getCallDeviceDefaultVideoReceiveCapability(): PlanetKitVideoCapability?
    • fun getConferenceDeviceDefaultVideoSendCapability(): PlanetKitVideoCapability?
    • fun getConferenceDeviceDefaultVideoReceiveCapability(): PlanetKitVideoCapability?
    • fun setPreferredHardwareCodec(preferredHardwareCodec: PlanetKitPreferredHardwareCodec)
    • fun getPreferredHardwareCodec(): PlanetKitPreferredHardwareCodec
Removed
  • PlanetKitVideoCapability class 1-to-1 callGroup call
    • preferredHwCodec: Boolean

Rename setVideoSource to setCustomVideoSource and clearVideoSource to clearCustomVideoSource

  • Renamed the API for clearer naming.

API

Changed
  • PlanetKitCall interface 1-to-1 call

    PreviousPlanetKit 6.0.0
    fun setVideoSource(videoSource: PlanetKitCustomVideoSource)fun setCustomVideoSource(videoSource: PlanetKitCustomVideoSource)
    fun clearVideoSource()fun clearCustomVideoSource()
  • PlanetKitConference interface Group call

    PreviousPlanetKit 6.0.0
    fun setVideoSource(videoSource: PlanetKitCustomVideoSource)fun setCustomVideoSource(videoSource: PlanetKitCustomVideoSource)
    fun clearVideoSource()fun clearCustomVideoSource()

Remove unused callback of ConferenceListener

  • Removed an unused and outdated API that was no longer in use.
  • You can now use ConferenceListener.onPeerListUpdated to get information about joined peer count.

API Change

Removed
  • ConferenceListener interface Group call
    • fun onRoomUpdated(joinedPeerCount: Int)

Move the setSpeakerOn and isSpeakerOn methods to PlanetKitAudioSwitch

  • The setSpeakerOn method has been moved from the PlanetKitCall and PlanetKitConference to the PlanetKitAudioSwitch and now returns a Boolean indicating success or failure.
  • The isSpeakerOn method has been moved from the PlanetKitCall and PlanetKitConference to the PlanetKitAudioSwitch.

API

Changed
  • PlanetKitCall class 1-to-1 call

    PreviousPlanetKit 6.0.0
    fun setSpeakerOn(isSpeakerOn: Boolean)PlanetKitAudioSwitch::fun setSpeakerOn(isSpeakerOn: Boolean): Boolean
    val isSpeakerOn: BooleanPlanetKitAudioSwitch::val isSpeakerOn: Boolean
  • PlanetKitConference class Group call

    PreviousPlanetKit 6.0.0
    fun setSpeakerOn(isSpeakerOn: Boolean)PlanetKitAudioSwitch::fun setSpeakerOn(isSpeakerOn: Boolean): Boolean
    val isSpeakerOn: BooleanPlanetKitAudioSwitch::val isSpeakerOn: Boolean

Support external cameras

  • This release adds support for external (USB) cameras.
  • External camera support depends on the Android device.
    • To use an external camera, the Android device must support the feature android.hardware.camera.external.
    • This can be checked using: packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL) or adb shell pm list features | grep "android.hardware.camera.external"

Example code

  • Switching to an external camera.
  PlanetKit.getCameraManager().startPreview(yourVideoView)
...

if (PlanetKitCameraType.EXTERNAL.isAvailable) {
PlanetKit.getCameraManager().cameraType = PlanetKitCameraType.EXTERNAL
}
  • Observing external camera availability.
  private val usbCameraAvailabilityListener = UsbCameraAvailabilityListener { isAvailable ->
// For example, update your UI components based on camera availability.
}

fun onViewCreated() {
PlanetKit.getCameraManager().addUsbCameraAvailabilityListener(usbCameraAvailabilityListener)
}

fun onDestroyView() {
PlanetKit.getCameraManager().removeUsbCameraAvailabilityListener(usbCameraAvailabilityListener)
}

API

Added
  • PlanetKitCameraType enum class 1-to-1 callGroup call
    • EXTERNAL
  • PlanetKitCameraManager interface 1-to-1 callGroup call
    • val supportDeviceFeatureExternalCamera: Boolean
    • fun interface UsbCameraAvailabilityListener
    • fun addUsbCameraAvailabilityListener(listener: UsbCameraAvailabilityListener)
    • fun removeUsbCameraAvailabilityListener(listener: UsbCameraAvailabilityListener)