Kanzi 3.9.8 migration guide¶
Use this migration guide to update Kanzi applications from Kanzi 3.9.7 to Kanzi 3.9.8.
Changes to the InputManipulator::Collection
API¶
In the input_manipulator.hpp
, fixed a typo in a member function.
If your Kanzi application uses the InputManipulator::Collection::cancelAllKeyInputManipators
function, rename it to InputManipulator::Collection::cancelAllKeyInputManipulators
.
Changes to the InputMethodListener
API¶
In the input_manipulator.hpp
, fixed a typo in a member function.
If your Kanzi application uses the InputMethodListener::onCompositionTextCommitedOverride
function, rename it to InputMethodListener::onCompositionTextCommittedOverride
.
Changes to the TextBoxConceptImpl
API¶
In the text_box_concept_impl.hpp
, fixed a typo in a member function.
If your Kanzi application uses the TextBoxConceptImpl::deteleCharactersAtCursor
function, rename it to TextBoxConceptImpl::deleteCharactersAtCursor
.
Changes to the PropertyDrivenAnimationPlayer
API¶
In the property_driven_animation_player.hpp
, fixed a typo in a member function.
If your Kanzi application uses the PropertyDrivenAnimationPlayer::timeControllerPropertyNoticationHandler
function, rename it to PropertyDrivenAnimationPlayer::timeControllerPropertyNotificationHandler
.
Changes to the ActivityHostConcept
API¶
In the activity_host_concept.hpp
, changed the signature of the virtual member function ActivityHostConcept::onActivateActivityOverride
. If your Kanzi application redefines this function, add to it the parameter of type bool
that sets whether to reset Activity property values of the Activity to activate.
Changes to the default surface properties¶
In the application configuration, changed the default values of these surface properties:
Color channel sizes
Depth buffer size
Number of anti-aliasing samples
This table shows the changed default values:
Configuration |
Kanzi 3.9.7 default value |
Kanzi 3.9.8 default value |
---|---|---|
|
16 bits |
24 bits |
|
platform decides |
8 bits |
|
platform decides |
8 bits |
|
platform decides |
8 bits |
|
platform decides |
8 bits |
|
|
|
These changes can have a small visual quality impact on Kanzi applications that rely on the default values. When you migrate your Kanzi application to 3.9.8, to match the default color channel sizes in earlier versions of Kanzi, use "unspecified"
.
See Surface properties.
Changes to the Android application templates¶
Kanzi 3.9.8 started supporting JDK 17 and no longer supports JDK 8. To use JDK 17, migrate your Kanzi application to use Gradle 7.6.2 and Android Gradle Plugin 7.4.2.
If you use JDK 11, you do not need to migrate your application.
To migrate your Kanzi application:
In
<ProjectName>/Application/configs/platforms/android_gradle/build.gradle
, replace:dependencies { classpath 'com.android.tools.build:gradle:<android-gradle-plugin-version>' classpath 'com.rightware.gradle:kanzi:<kanzi-gradle-plugin-version>' }
with
dependencies { classpath 'com.android.tools.build:gradle:7.4.2' classpath 'com.rightware.gradle:kanzi:0.8.1' }
In
<ProjectName>/Application/configs/platforms/android_gradle/gradle/wrapper/gradle-wrapper.properties
, replace:distributionUrl=https\://services.gradle.org/distributions/gradle-<version>-bin.zip
with
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
In
<ProjectName>/Application/configs/platforms/android_gradle/app/build.gradle
:Replace:
android { compileSdkVersion 28 defaultConfig { minSdkVersion 26 targetSdkVersion 28 // ... } }
with
android { // Add a namespace for your Kanzi application. // In most cases, the namespace is the same as "applicationId". namespace '<project-namespace>' compileSdk 32 defaultConfig { minSdk 26 targetSdk 28 // ... } }
Remove:
kanzi { appFramework "kanziruntime-droidfw" }
Add a new item to the
dependencies
section:dependencies { implementation 'com.rightware.kanzi:kanziruntime-droidfw@aar' // ... }
Set the Android SDK version:
If you do not plan to publish your Kanzi application on Google Play, in the
android
section, disable the checking of the target SDK version:android { lintOptions { disable 'ExpiredTargetSdkVersion' } }
If you plan to publish your Kanzi application on Google Play, set the
targetSdk
option to the value that Google Play requires. See https://developer.android.com/google/play/requirements/target-sdk.For example:
android { defaultConfig { targetSdk 33 } }
In
<ProjectName>/Application/configs/platforms/android_gradle/app/src/main/AndroidManifest.xml
, change:<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="<PackageName>">
to
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
If your application uses Code Behind, in
<ProjectName>/Application/CMakeLists.txt
, in theadd_subdirectory
calls for Code Behind, replace spaces with underscores.For example, replace:
set(XML_data_source_codebehind_lib_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../../Tool_project/CodeBehind/XML data source") if(EXISTS "${XML_data_source_codebehind_lib_dir}") add_subdirectory("${XML_data_source_codebehind_lib_dir}" "${CMAKE_CURRENT_BINARY_DIR}/CodeBehind/XML data source") include_directories(${XML_data_source_codebehind_lib_dir}/include) target_link_libraries(XML_data_source_executable XML_data_source_CodeBehind) endif()
with
set(XML_data_source_codebehind_lib_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../../Tool_project/CodeBehind/XML data source") if(EXISTS "${XML_data_source_codebehind_lib_dir}") add_subdirectory("${XML_data_source_codebehind_lib_dir}" "${CMAKE_CURRENT_BINARY_DIR}/CodeBehind/XML_data_source") include_directories(${XML_data_source_codebehind_lib_dir}/include) target_link_libraries(XML_data_source_executable XML_data_source_CodeBehind) endif()
In Kanzi Studio, open the Kanzi Studio project of your application. Select File > Open Kanzi Command Prompt and on the command line run:
cd ..\Application\configs\platforms\android_gradle\ gradlew wrapper
This way you upgrade Gradle in your application.
(Optional) If you want to open the Kanzi application in Android Studio, update Android Studio to Electric Eel or a newer version.
If you build the Kanzi Android application from Kanzi Studio, this step is not required.
Changes to the EGL API¶
Moved function getEGLConfig
from qnx_egl_common.hpp
to egl_common.hpp
. If your Kanzi application uses the function, include the egl_common.hpp
header.
Changes to the Material
API¶
Removed the Material::ChangeCounterProperty
property type. RenderEntry3D
listens for changes in material properties.
Changes to the Wayland graphics output API¶
Changed the default Wayland shell from IVI to XDG and removed the fallback option.
You can now set which Wayland shell Kanzi uses. See Wayland shell.
Changes to the main loop scheduler¶
In the main loop scheduler, removed all externally ticked overloads, that is, functions that take elapsed duration as their argument.
To attach the main loop scheduler to your custom source of time, you can now use MainLoopScheduler::setClockCallback
, and use the respective overload that takes no arguments:
Kanzi 3.9.7 |
Kanzi 3.9.8 |
---|---|
MainLoopScheduler::advanceFrame (chrono::nanoseconds lastFrameDuration) |
|
MainLoopScheduler::getDurationUntilNextTimer (chrono::nanoseconds elapsedDuration) |
|
MainLoopScheduler::run (chrono::nanoseconds lastFrameDuration) |