Book Image

Tizen Cookbook

By : Leon Anavi
Book Image

Tizen Cookbook

By: Leon Anavi

Overview of this book

Table of Contents (5 chapters)

The first step of starting Tizen application development is to download the Tizen SDK and install it. The installation is similar on all supported operating systems. This recipe explains the basics of the installation process of Tizen SDK 2.2.1. Details and notes of each of the supported operating systems are discussed in the subsequent recipes of this chapter.

Getting ready

The SDK contains all the tools required for the development of both native and web Tizen applications. It consists of an IDE based on Eclipse, Emulator, Simulator for web applications, a tool chain, several sample applications, and full documentation. The Tizen SDK is
How to do it...

For
How it works…

The Tizen IDE is based on Eclipse. Most of the source code of Eclipse is written using the Java programming language. In general, the main advantage of applications created with Java is that they are compatible with different platforms, and this is the main reason why the Tizen IDE and SDK work fine on several desktop operating systems. See also

For details about the installation on Windows, Mac OS, and Ubuntu, please refer to the subsequent recipes of this chapter.
Getting ready

It is recommended to ensure that your development system matches the requirements of the Tizen SDK before proceeding with the installation. The Tizen SDK is compatible with the 32-bit and 64-bit versions of Windows 7, as well as with the 32-bit version of Windows XP. Although Windows 8 is not officially listed among the supported platforms, the version for Windows 7 should be compatible with it. How to do it...

The installation of the See also

After the installation, it might be convenient to register the Tizen SDK installation directory in the environmental path of Windows so that you will be able to directly run SDB from any location. Please refer to the recipes related to SDB for instructions on how to do this.

One of the reasons a lot of mobile application developers use Mac OS is that it is required for the development of iOS applications. Unlike iOS, the development tools for Tizen do not have such limitations, and they can be installed on Mac OS as well as other popular desktop operating systems.

Download the .dmg file and launch it by following the provided instructions in the recipe Installing the Tizen SDK.

If you plan to develop native Tizen applications on Mac OS X, install command-line tools following the Apple guidelines for the version of Mac OS X that you are using (https://developer.apple.com/library/ios/technotes/tn2339/_index.html).

On Mac OS X 10.7.5 (also known as Mac OS X Lion) or later, the Install Manager might fail due to the security settings of the operating system. These settings have to be modified to temporarily prevent the Mac OS X Gatekeeper from blocking the Install Manager and to allow you to proceed with the Tizen SDK installation. Please perform the following steps to configure Gatekeeper on Mac OS X and to solve the issue:

Getting ready

The network installation manager of the Tizen SDK for Mac OS is distributed as a standard disk image with the dmg extension.

Download the .dmg file and launch it by following the provided instructions in the recipe Installing the Tizen SDK.

If you plan to develop native Tizen applications on Mac OS X, install command-line tools following the Apple guidelines for the version of Mac OS X that you are using (https://developer.apple.com/library/ios/technotes/tn2339/_index.html).

On Mac OS X 10.7.5 (also known as Mac OS X Lion) or later, the Install Manager might fail due to the security settings of the operating system. These settings have to be modified to temporarily prevent the Mac OS X Gatekeeper from blocking the Install Manager and to allow you to proceed with the Tizen SDK installation. Please perform the following steps to configure Gatekeeper on Mac OS X and to solve the issue:

How to do it...

Download the .dmg file and launch it by following the provided instructions in the recipe Installing the Tizen SDK.

If you plan to develop native Tizen applications on Mac OS X, install command-line tools following the Apple guidelines for the See also

If you are interested in adding SDB to the environment path after successful installation of the Tizen SDK, refer to the recipes related to SDB.

Ubuntu is the only Linux distribution that is recommended and fully supported by the Tizen SDK. Additional software has to be installed prior to launching the Tizen SDK Install Manager on Ubuntu.

This recipe contains four major steps to install all the required software components and successfully complete the SDK installation on Ubuntu. Before you start, make sure that at least 6 GB free space is present on the computer.

The full installation process can be divided into four milestones:

Visit tizen.org to get the Tizen SDK or just execute the following commands to download Tizen SDK 2.2.1 using your web browser or command-line tool such as wget. For example, if you have a 32-bit version of Ubuntu, then you can run the following command in the terminal:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu32-v2.2.71.bin

The URL of the installation file for the 64-bit version is slightly different, so it can be downloaded by executing the following command:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu64-v2.2.71.bin

Oracle JRE must be installed before launching the Tizen SDK.Please note that OpenJDK is not supported. Please follow these steps if you do not have Oracle JRE installed:

Furthermore, Java can be enabled for the Mozilla Firefox web browser that is shipped as the default web browser for Ubuntu. A couple of additional steps must be executed:

We are almost ready to launch the Tizen SDK installer, but before that, some dependencies must be installed.

Ensure that the following packages are installed:

If you are wondering whether a package has already been installed on your development platform, please check it by executing the command dpkg -s followed by the package's name or the list of packages. To install any of the packages from the preceding list, open a terminal and execute sudo apt-get install followed by the name of the package, as follows:

Users of Ubuntu 12.10 or any older version should install the package gksudo as well by executing the following command:

Please note that if you are using Ubuntu 13.04 or a newer version, you will not be able to install this package as it is not available any more. Instead, you should install package gksu by executing the following command:

Finally, it is time to proceed with the installation of the Tizen SDK. Make sure that the binary file of the Install Manager has executable permissions and launch it. Please note that <version> and <bits> must be replaced with values that match the file downloaded at the beginning of the tutorial:

When the Install Manager launches, follow the instructions from the Installing the Tizen SDK recipe to complete the installation.

If you are unsure which install type is appropriate for your needs, it is recommended that you select Typical.

In this section, you will learn how to troubleshoot your GNU/Linux installation of Tizen.

Getting ready

Officially, Tizen SDK 2.2.1 is compatible only with two versions of Ubuntu: 12.04 and 12.10. Despite this, it is absolutely possible to install and run the SDK on newer versions too. This is applicable to the following versions of Ubuntu:

12.10 32-bit
13.04 32-bit
13.10 64-bit

Although Ubuntu 13.10 is not officially supported, the Tizen SDK can be installed successfully on it as well, but a workaround related to libudev.so.1 should be applied to run SDB. Please check the troubleshooting section of the recipe for more information about fixing SDB on Ubuntu 13.10.

The full installation process can be divided into four milestones:

Visit tizen.org to get the Tizen SDK or just execute the following commands to download Tizen SDK 2.2.1 using your web browser or command-line tool such as wget. For example, if you have a 32-bit version of Ubuntu, then you can run the following command in the terminal:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu32-v2.2.71.bin

The URL of the installation file for the 64-bit version is slightly different, so it can be downloaded by executing the following command:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu64-v2.2.71.bin

Oracle JRE must be installed before launching the Tizen SDK.Please note that OpenJDK is not supported. Please follow these steps if you do not have Oracle JRE installed:

Furthermore, Java can be enabled for the Mozilla Firefox web browser that is shipped as the default web browser for Ubuntu. A couple of additional steps must be executed:

We are almost ready to launch the Tizen SDK installer, but before that, some dependencies must be installed.

Ensure that the following packages are installed:

If you are wondering whether a package has already been installed on your development platform, please check it by executing the command dpkg -s followed by the package's name or the list of packages. To install any of the packages from the preceding list, open a terminal and execute sudo apt-get install followed by the name of the package, as follows:

Users of Ubuntu 12.10 or any older version should install the package gksudo as well by executing the following command:

Please note that if you are using Ubuntu 13.04 or a newer version, you will not be able to install this package as it is not available any more. Instead, you should install package gksu by executing the following command:

Finally, it is time to proceed with the installation of the Tizen SDK. Make sure that the binary file of the Install Manager has executable permissions and launch it. Please note that <version> and <bits> must be replaced with values that match the file downloaded at the beginning of the tutorial:

When the Install Manager launches, follow the instructions from the Installing the Tizen SDK recipe to complete the installation.

If you are unsure which install type is appropriate for your needs, it is recommended that you select Typical.

In this section, you will learn how to troubleshoot your GNU/Linux installation of Tizen.

How to do it...

The full installation process can be divided into four milestones:

Downloading the Tizen SDK.
Installing Oracle Java Runtime Environment (JRE).
Installing dependencies.
Installing the Tizen SDK.

Visit

tizen.org to get the Tizen SDK or just execute the following commands to download Tizen SDK 2.2.1 using your web browser or command-line tool such as wget. For example, if you have a 32-bit version of Ubuntu, then you can run the following command in the terminal:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu32-v2.2.71.bin

The URL of the installation file for the 64-bit version is slightly different, so it can be downloaded by executing the following command:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu64-v2.2.71.bin

Oracle JRE must be installed before launching the Tizen SDK.Please note that OpenJDK is not supported. Please follow these steps if you do not have Oracle JRE installed:

Furthermore, Java can be enabled for the Mozilla Firefox web browser that is shipped as the default web browser for Ubuntu. A couple of additional steps must be executed:

We are almost ready to launch the Tizen SDK installer, but before that, some dependencies must be installed.

Ensure that the following packages are installed:

If you are wondering whether a package has already been installed on your development platform, please check it by executing the command dpkg -s followed by the package's name or the list of packages. To install any of the packages from the preceding list, open a terminal and execute sudo apt-get install followed by the name of the package, as follows:

Users of Ubuntu 12.10 or any older version should install the package gksudo as well by executing the following command:

Please note that if you are using Ubuntu 13.04 or a newer version, you will not be able to install this package as it is not available any more. Instead, you should install package gksu by executing the following command:

Finally, it is time to proceed with the installation of the Tizen SDK. Make sure that the binary file of the Install Manager has executable permissions and launch it. Please note that <version> and <bits> must be replaced with values that match the file downloaded at the beginning of the tutorial:

When the Install Manager launches, follow the instructions from the Installing the Tizen SDK recipe to complete the installation.

If you are unsure which install type is appropriate for your needs, it is recommended that you select Typical.

In this section, you will learn how to troubleshoot your GNU/Linux installation of Tizen.

There's more…

In this section, you will learn how to troubleshoot

your GNU/Linux installation of Tizen.

See also

Please refer to the Getting started with Smart Development Bridge recipe about SDB if you are interested in registering SDB as a global command.
For up-to-date information, please refer to the Tizen

Tizen is an open source software platform and it is very flexible. Third-party individual developers or companies can develop extension packages for the Tizen SDK. Other developers can use and abuse third-party packages in their applications using specific repositories. Some extensions for the Tizen SDK are available at https://developer.tizen.org/downloads/add-on-sdks.

How to do it...

Please perform the following steps to add extra repositories and install additional packages:

Launch the Tizen SDK Install Manager.
Click on Next to proceed.
Select Extra Repository to open a dialog.
Click on Add.
Set an external server as well as the name of a repository and click on OK. The repository information will be displayed in the previous window. Click on OK again.
Select the required packages and click on Install.

Perform the How it works…

Each repository contains additional packages that are optional and can be added or deleted by the developer at any time. A repository is specified by a URL, so it is mandatory to have a network connection to the repository's server to download any of its packages. If you are experiencing issues connecting to a repository using HTTP Secure (HTTPS)

The default and recommended IDE that is included in the Tizen SDK is based on Eclipse. Eclipse is an open source software, and through the years it has become a de facto standard for the development of applications for mobile platforms. Developers with experience in Android, Bada, Symbian, and BlackBerry 10 are already familiar with Eclipse as it, or IDEs based on it, is used for application development for these platforms.

These are the most popular and important views in the Tizen IDE:

Getting ready

The first step of the journey into application development for Tizen starts with the launch of the Tizen IDE. It is based on Eclipse, so it is not a surprise that the Tizen IDE also asks you to select a workspace. If you do not want to be asked to select the workspace every time you start the IDE, just check the option Use this as default and do not ask again. To change the workspace when the Tizen IDE is running, just navigate to File | Switch Workspace.

A welcome screen will be displayed on the first start screen of the Tizen IDE. Click on Workbench to open the Tizen Web perspective and start developing applications. If you want to have a look at the documentation, select any of the other three options. You can get back to the home screen at any time by navigating to Help | Welcome. If you are searching for Tizen's

These are the most popular and important views in the Tizen IDE:

How to do it...

For a lot of developers, the look and feel of their IDE is a key factor for their productivity. Tizen IDE supports all customization options provided by Eclipse. This recipe contains only a few hints for customization of the background and text colors. For more information, please have a look at Tizen IDE and Eclipse documentation or just delve into the preferences.

Execute the following actions to change the background color of the text editor:

Navigate to Windows | Preferences and a dialog box will appear.
Navigate to General | Editors | Text Editors.
Adjust the background color from the list of Appearance color options.
Change the text colors.

Text colors depend on the syntax coloring of the programming languages. Tizen web applications are developed using HTML, CSS, and JavaScript, while the development of native mobile applications relies on C++. Follow these simple steps to change the syntax coloring:

Navigate to Windows | Preferences and a dialog box will appear.
Select the desired programming language and navigate to Editor | Syntax Coloring.
Adjust the colors.

Perform the following

These are the most popular and important views in the Tizen IDE:

There's more...

These are the most popular and important views in the

Tizen IDE:

It is mandatory to create and set a secure profile in order to successfully deploy and debug applications on a Tizen device. My personal observation is that a lot of developers experience issues due to the secure profile when they are deploying an application on a device for the first time. This recipe explains a couple of ways to generate a certificate and set it on the Tizen IDE.

Getting ready

If an Active Secure profile
How to do it...

The Active Secure profile can be created manually through the command line or using the integrated graphical user interface from the Tizen IDE.

The recommended way is to
How it works…

The creation process of the certificate is similar no matter which approach or operating system you prefer to use. Both the

Tizen Web Simulator is a simplified tool to test and debug web applications. It is included in the Tizen SDK. Web Simulator is available under Apache Software License v.2.0 because it is based on the Ripple-UI Framework, which was initially developed by BlackBerry (known in the past as research in motion) to test BB10 HTML5 WebWorks applications. Web Simulator offers the following features:

The Google Chrome web browser must be installed because it powers the Tizen Web Simulator. This actually means that HTML5 applications that run on Google Chrome will also be running on Tizen. Another benefit is that all development features of the Google Chrome browser are available in the simulator, including the Remote Inspector tool that can be accessed by pressing F12.

Getting ready

It is mandatory to download and install Google Chrome on the development system if you intend to test applications on Tizen Web Simulator. The installation path of the Google Chrome browser can be specified in the Preferences of the simulator. How to do it...

Three options are available to How it works…

Google Chrome will be started automatically with the Web Simulator. Adjust the orientation and zooming of the simulator by editing the configurations from the panel on the left-hand side of the browser.

Please note that the Web Simulator is compatible only with HTML5 web applications and it is useless for native applications. The simulator loads the HTML file specified at config.xml when the web application is launched. By default, the name of the file is index.html.

See also

Please refer to the recipes in
  • Chapter 11, Debugging Apps in Tizen, to learn how to simulate events and debug applications using the Web Simulator.

Although it is highly recommended to deploy and debug applications directly on a real Tizen device, it is not mandatory to have a Tizen device in order to develop applications. A virtual device Emulator is delivered along with the other tools of the Tizen SDK. Developers can create virtual machines with custom hardware specifications that match their requirements for testing.

The device Emulator is a virtual machine based on the open source project Quick Emulator (QEMU). It provides full stacks of the Tizen platform. Emulator Manager and Event Injector are also provided among the Emulator tools of the SDK. Unlike the simulator, the emulator provides strict implementation of the device specifications and there are no guest modifications. Please note that Tizen SDK 2.2.1 supports only the x86 machine architecture for guests.

QEMU, the engine behind the Tizen Emulator, is an open source project for a visualization machine that allows you to run a separate operating system as just another task on the desktop of your development machine. The Android emulator is also based on QEMU. For more information about QEMU and details regarding its licenses, please visit http://wiki.qemu.org/.

The Tizen Emulator supports a variety of features, and the most important features are as follows:

Of course, the emulator has some limitations compared to a real Tizen device. The differences impact the behavior of features:

Getting ready

Please ensure that you are running the Tizen Emulator on a computer with a minimum screen resolution of 1280 x 1024 pixels and the latest version of graphical drivers with OpenGL support. It is recommended to use an Intel CPU with
How to do it...

To create new instances of the
See also

You can communicate with the running Tizen emulator using Smart Development Bridge (SDB). For more information and details, please check the next recipe. Descriptions and examples of deploying and running applications on the emulator as well as simulating events with the Event Injector are available in

Smart Development Bridge (SDB) is a command-line tool for communication with the Tizen emulator or connected Tizen devices. Its role in Tizen is the same as the role of Android Debug Bridge (ADB) in Android. SDB is an essential part of the Tizen SDK and it is installed with it. SDB manages multiple device connections and provides basic commands for application development and debugging. The main features of SDB are as follows:

SDB works as a typical client-server application and it consists of three main components:

Although not mandatory, it is convenient to add SDB to the environmental path. To do it, follow the steps given in this recipe, depending on the operating system of your development machine.

To add SDB to the environmental path of Windows 7, perform the following steps:

If you are using Windows XP, the following steps will be helpful if you want to add SDB to the environmental path:

To add SDB to the environmental path for all users on Ubuntu, append the SDB directory to the path that is defined at file /etc/environment. Log out and log in again or just reboot to apply the changes.

To add SDB to the environmental path for all users on Mac OS X Leopard and above, create a text file at the directory /etc/paths.d/ and set the location of SDB within it using root privileges, for example, sudo -s 'echo "<tizen_sdk>/sdb" > /etc/paths.d/sdb'.

A quick and easy alternative approach to achieve a similar result on UNIX-like operating systems, such as Linux and Mac OS, without modifying /etc/environment or creating a file at /etc/paths.d is to create a symbolic link to SDB in the bin directory using root privileges, for example, sudo ln –s <tizen_sdk>/sdb /bin/sdb.

Please note that <tizen_sdk> in both examples must be replaced with the actual path, depending on the installation.

Getting ready

After successful installation of the Tizen SDK, SDB is located under tizen_sdk/SDK/sdb. To use the client, an SDB command must be executed within its directory unless the sdb location has been added to the environmental path variable.

To add SDB to the environmental path of Windows 7, perform the following steps:

If you are using Windows XP, the following steps will be helpful if you want to add SDB to the environmental path:

To add SDB to the environmental path for all users on Ubuntu, append the SDB directory to the path that is defined at file /etc/environment. Log out and log in again or just reboot to apply the changes.

To add SDB to the environmental path for all users on Mac OS X Leopard and above, create a text file at the directory /etc/paths.d/ and set the location of SDB within it using root privileges, for example, sudo -s 'echo "<tizen_sdk>/sdb" > /etc/paths.d/sdb'.

A quick and easy alternative approach to achieve a similar result on UNIX-like operating systems, such as Linux and Mac OS, without modifying /etc/environment or creating a file at /etc/paths.d is to create a symbolic link to SDB in the bin directory using root privileges, for example, sudo ln –s <tizen_sdk>/sdb /bin/sdb.

Please note that <tizen_sdk> in both examples must be replaced with the actual path, depending on the installation.

How to do it...

To add SDB to the

environmental path of Windows 7, perform the following steps:

If you are using Windows XP, the following steps will be helpful if you want to add SDB to the environmental path:

To add SDB to the environmental path for all users on Ubuntu, append the SDB directory to the path that is defined at file /etc/environment. Log out and log in again or just reboot to apply the changes.

To add SDB to the environmental path for all users on Mac OS X Leopard and above, create a text file at the directory /etc/paths.d/ and set the location of SDB within it using root privileges, for example, sudo -s 'echo "<tizen_sdk>/sdb" > /etc/paths.d/sdb'.

A quick and easy alternative approach to achieve a similar result on UNIX-like operating systems, such as Linux and Mac OS, without modifying /etc/environment or creating a file at /etc/paths.d is to create a symbolic link to SDB in the bin directory using root privileges, for example, sudo ln –s <tizen_sdk>/sdb /bin/sdb.

Please note that <tizen_sdk> in both examples must be replaced with the actual path, depending on the installation.

See also

Please have a look at the next recipe to learn how to use the full capabilities of SDB.

SDB is a powerful tool with a lot of capabilities and features. Although you can successfully develop applications using the Tizen IDE without even knowing what SDB is, it is recommended to explore the options of the tool. SDB is a developer's best friend when it comes to management of a connected device, transferring files, and debugging applications.

Perform the following steps to enable and use SDB:

According to the Tizen 2.2.1 official development guide, the values provided for option in the preceding command can be:

The following is a list of all the supported SDB commands with some brief information about them:

Command

Details

devices

This provides a list of connected devices.

connect <host>[:<port>]

This connects to a device through TCP/IP.

disconnect <host>[:<port>]

This disconnects a device. The host and port parameters are optional. If they are not specified, all devices will be disconnected.

push <local> <remote> [-with-utf8]

This transfers a file from the development system to the connected Tizen device.

pull <remote> [<local>]

This transfers a file from the connected Tizen device to the development system.

shell

This accesses a remote shell of the connected Tizen device or emulator.

shell <command>

This remotely runs a single shell command to a connected Tizen device or emulator. Execution of the following commands is allowed: ls, rm, mv, cd, mkdir, cp, touch, echo, tar, grep, cat, chmod, rpm, find, uname, netstat, and killall.

dlog [option] [<filter-spec>]

This prints the current log out of the buffers of a connected device or emulator.

install <path_to_tpk>

This installs a tpk package.

uninstall <appid>

This uninstalls an application using its ID.

forward <local> <remote>

This specifies the local and remote socket to configure port forwarding.

help

This displays SDB help information and usage guides.

version

This prints the SDB version number.

start-server

This launches the SDB server if it is not already running.

kill-server

This terminates the SDB server if it is running.

get-state

This displays the status of the connection to devices.

get-serialno

This displays the serial number of a connected Tizen device.

status-window

This displays the status of a connected device until the developer manually terminates the command.

root <on|off>

This enables or disables the root account mode.

Android developers will be happy to find out a lot of similarities between Tizen Smart Development Bridge and Android Debug Bridge. Similar names of both tools is not a coincidence. Both tools have common purposes. Most of the commands are executed using the same keywords on both platforms and have similar behavior.

The following are several use cases of SDB commands:

How to do it...

Perform the following steps to enable and use SDB:

Make sure that the

According to the Tizen 2.2.1 official development guide, the values provided for option in the preceding command can be:

The following is a list of all the supported SDB commands with some brief information about them:

Command

Details

devices

This provides a list of connected devices.

connect <host>[:<port>]

This connects to a device through TCP/IP.

disconnect <host>[:<port>]

This disconnects a device. The host and port parameters are optional. If they are not specified, all devices will be disconnected.

push <local> <remote> [-with-utf8]

This transfers a file from the development system to the connected Tizen device.

pull <remote> [<local>]

This transfers a file from the connected Tizen device to the development system.

shell

This accesses a remote shell of the connected Tizen device or emulator.

shell <command>

This remotely runs a single shell command to a connected Tizen device or emulator. Execution of the following commands is allowed: ls, rm, mv, cd, mkdir, cp, touch, echo, tar, grep, cat, chmod, rpm, find, uname, netstat, and killall.

dlog [option] [<filter-spec>]

This prints the current log out of the buffers of a connected device or emulator.

install <path_to_tpk>

This installs a tpk package.

uninstall <appid>

This uninstalls an application using its ID.

forward <local> <remote>

This specifies the local and remote socket to configure port forwarding.

help

This displays SDB help information and usage guides.

version

This prints the SDB version number.

start-server

This launches the SDB server if it is not already running.

kill-server

This terminates the SDB server if it is running.

get-state

This displays the status of the connection to devices.

get-serialno

This displays the serial number of a connected Tizen device.

status-window

This displays the status of a connected device until the developer manually terminates the command.

root <on|off>

This enables or disables the root account mode.

Android developers will be happy to find out a lot of similarities between Tizen Smart Development Bridge and Android Debug Bridge. Similar names of both tools is not a coincidence. Both tools have common purposes. Most of the commands are executed using the same keywords on both platforms and have similar behavior.

The following are several use cases of SDB commands:

See also

The information provided by the log buffers of a device might be valuable during the debugging of Tizen applications. More details and advanced usage examples of sdb dlog are available in