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 isAUDIO_MANAGER
. - For more information, please refer to the API documentation.
API
Added
PlanetKitMicMuteControlMethod
enum class 1-to-1 callGroup callAUDIO_MANAGER
AUDIO_DRIVER
PlanetKitVerifyCallParam.Builder
class 1-to-1 callfun setMicMuteControlMethod(value: PlanetKitMicMuteControlMethod)
PlanetKitMakeCallParam.Builder
class 1-to-1 callfun setMicMuteControlMethod(value: PlanetKitMicMuteControlMethod)
PlanetKitConferenceParam.Builder
class Group callfun 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 originalAudioSource
has been deprecated.
API
Changed
-
PlanetKitCall
interface 1-to-1 callPrevious PlanetKit 6.0.0 fun setAudioSource(audioSource: AudioSource?)
fun setCustomAudioSource(audioSource: PlanetKitCustomAudioSource)
-
PlanetKitConference
interface Group callPrevious PlanetKit 6.0.0 fun setAudioSource(audioSource: AudioSource?)
fun setCustomAudioSource(audioSource: PlanetKitCustomAudioSource)
Added
PlanetKitCustomAudioSource
class 1-to-1 callPlanetKitCall
interface 1-to-1 callfun clearCustomAudioSource()
PlanetKitConference
interface Group callfun 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 callval 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 toonVideoEnabledByPeerAndMyVideoPaused
. - From version 6.0 onward, when a video call is enabled by the peer, the local user's video will remain paused.
- In previous versions, you could use
- If you previously relied on
PlanetKitResponseOnEnableVideo.SEND
, please update your implementation to manually resume video after receiving theonVideoEnabledByPeerAndMyVideoPaused
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 callPrevious PlanetKit 6.0.0 fun onVideoEnabledByPeer(call: PlanetKitCall)
fun onVideoEnabledByPeerAndMyVideoPaused(call: PlanetKitCall)
Removed
PlanetKitResponseOnEnableVideo
enum class 1-to-1 callPlanetKitMakeCallParam.Builder
class 1-to-1 callfun responseOnEnableVideo(responseOnEnableVideo: PlanetKitResponseOnEnableVideo)
PlanetKitVerifyCallParam.Builder
class 1-to-1 callfun 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 callPrevious PlanetKit 6.0.0 fun getAudioVolumeLevelSetting(subgroupName: String?): AudioVolumeResult
fun getAudioVolumeLevelSetting(): AudioVolumeResult
Added
PlanetKitPeerControl
class Group callfun setVolumeLevelSetting(@IntRange(from = 0, to = 110) volumeLevel: Int, userData: Any? = null, callback: PlanetKitRequestCallback? = null): Boolean
PlanetKitPeerView
class Group callfun setVolumeLevelSetting(@IntRange(from = 0, to = 110) volumeLevel: Int, userData: Any? = null, callback: PlanetKitRequestCallback? = null): Boolean
Removed
PlanetKitSubgroup
interface Group callfun getPeerVolumeLevelSetting(user: PlanetKitUser): Int
PlanetKitSubgroupManager
interface Group callfun 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 callPrevious PlanetKit 6.0.0 val maxResolution: PlanetKitVideoResolution
val maxResolution: PlanetKitVideoResolutionCapability
Added
PlanetKitVideoResolutionCapability
enum class 1-to-1 callGroup callQVGA(2)
VGA(3)
HD(4)
PlanetKitPreferredHardwareCodec
data class 1-to-1 callGroup callval callVideoSend: Boolean
val callVideoReceive: Boolean
val conferenceVideoSend: Boolean
val conferenceVideoReceive: Boolean
PlanetKit
object 1-to-1 callGroup callfun 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 callpreferredHwCodec: Boolean
Rename setVideoSource
to setCustomVideoSource
and clearVideoSource
to clearCustomVideoSource
- Renamed the API for clearer naming.
API
Changed
-
PlanetKitCall
interface 1-to-1 callPrevious PlanetKit 6.0.0 fun setVideoSource(videoSource: PlanetKitCustomVideoSource)
fun setCustomVideoSource(videoSource: PlanetKitCustomVideoSource)
fun clearVideoSource()
fun clearCustomVideoSource()
-
PlanetKitConference
interface Group callPrevious PlanetKit 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 callfun onRoomUpdated(joinedPeerCount: Int)
Move the setSpeakerOn
and isSpeakerOn
methods to PlanetKitAudioSwitch
- The
setSpeakerOn
method has been moved from thePlanetKitCall
andPlanetKitConference
to thePlanetKitAudioSwitch
and now returns aBoolean
indicating success or failure. - The
isSpeakerOn
method has been moved from thePlanetKitCall
andPlanetKitConference
to thePlanetKitAudioSwitch
.
API
Changed
-
PlanetKitCall
class 1-to-1 callPrevious PlanetKit 6.0.0 fun setSpeakerOn(isSpeakerOn: Boolean)
PlanetKitAudioSwitch::fun setSpeakerOn(isSpeakerOn: Boolean): Boolean
val isSpeakerOn: Boolean
PlanetKitAudioSwitch::val isSpeakerOn: Boolean
-
PlanetKitConference
class Group callPrevious PlanetKit 6.0.0 fun setSpeakerOn(isSpeakerOn: Boolean)
PlanetKitAudioSwitch::fun setSpeakerOn(isSpeakerOn: Boolean): Boolean
val isSpeakerOn: Boolean
PlanetKitAudioSwitch::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)
oradb shell pm list features | grep "android.hardware.camera.external"
- To use an external camera, the Android device must support the feature
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 callEXTERNAL
PlanetKitCameraManager
interface 1-to-1 callGroup callval supportDeviceFeatureExternalCamera: Boolean
fun interface UsbCameraAvailabilityListener
fun addUsbCameraAvailabilityListener(listener: UsbCameraAvailabilityListener)
fun removeUsbCameraAvailabilityListener(listener: UsbCameraAvailabilityListener)