Running a preconfigured Kanzi Connect Server

This example shows how you can run a Kanzi Connect Server locally on Windows and Android platforms.

You can find this example in the <KanziConnectInstallation>/SDK/examples/Server/Demo directory.

Running a preconfigured Kanzi Connect Server on Windows

You can find the Kanzi Connect Server executable for Windows in <KanziConnectInstallation>/SDK/lib/win64/GL_vs2017_Release_DLL/connect_server.exe. This server has a predefined set of content for demonstration purposes, located in the ContentPack directory. The content pack contains:

  • Default.db SQLite database that declares the ‘Server Local Content’

  • Music tracks and cover art for the playlists in the database

  • Contact photos for the contacts in the database

Start the server by running the server executable connect_server.exe. When started, the server starts to listen for connections from Kanzi Connect applications.

Shut down the server by pressing any key.

Running a preconfigured Kanzi Connect Server on Android

To run a preconfigured Kanzi Connect Server on Android:

  1. Extract the android_gradle platform package zip file to the <KanziConnectInstallation> directory.

  2. Connect an Android device to your computer.

  3. In Android Studio open <KanziConnectInstallation>/SDK/examples/Server/Demo/Application/configs/platforms/android_gradle.

  4. In Android Studio in the main menu select Build > Make Project to build the application package.

    By default Android Studio uses the debug build configuration. You can find the built Android package at <KanziConnectInstallation>/SDK/examples/Server/Demo/Application/configs/platforms/android_gradle/app/build/libs/apk/debug.

    To build using the release build configuration, open the Build Variants window and set the Build Variant to release.

  5. In the Android Studio main menu select Run > Run ‘app’ and select the device to which you want to deploy your application.

  6. Copy the <KanziConnectInstallation>/ContentPack directory to the Connect directory of the Android device storage. The storage can be located either in the internal or the external memory of the Android device.

  7. Find the Kanzi Connect Server application on the Android device and start it. It is the control panel application for the Kanzi Connect Server.

  8. Check that the server is running on the device:

    • The Running toggle button is set to the ON position.

    • There is information in the log.

Note

Clients that are about to connect to the Kanzi Connect Server must always have network visibility for the server. Make sure that:

  • The Kanzi Connect Client and Kanzi Connect Server share the same network (wireless or wired).

  • No firewall is blocking any of the network traffic.