Application

Chose application
.NET Native Web Flutter
Chose version
ver. 14.0 ver. 13.0 ver. 12.0 ver. 11.0 ver. 10.0 ver. 9.0 ver. 8.0 ver. 7.0 ver. 6.0 ver. 5.0 ver. 4.0
Choose device
Tizen.System.Display, <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Led.md/">Tizen.System.Led, <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.IR.md/">Tizen.System.IR and <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Vibrator.md/">Tizen.System.Vibrator classes, the application has to request permission by adding the following privileges to the <code>tizen-manifest.xml<\/code> file:<\/p>\n<code class=\"language-XML\">&lt;privileges&gt;\n &lt;!--To use the Display class --&gt;\n &lt;privilege&gt;http:\/\/tizen.org\/privilege\/display&lt;\/privilege&gt;\n &lt;!--To use the Vibrator class --&gt;\n &lt;privilege&gt;http:\/\/tizen.org\/privilege\/haptic&lt;\/privilege&gt;\n &lt;!--To use the IR class --&gt;\n &lt;privilege&gt;http:\/\/tizen.org\/privilege\/use_ir&lt;\/privilege&gt;\n &lt;!--To use the Led class --&gt;\n &lt;privilege&gt;http:\/\/tizen.org\/privilege\/led&lt;\/privilege&gt;\n&lt;\/privileges&gt;\n<\/code>\n<\/li>\n<li>\n<p>To use the methods and properties of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.md/">Tizen.System namespace classes, include the namespace in your application:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">using<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Tizen<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">System<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<\/ol>\n<h2 id=\"content-retrieve-battery-information\"><a href=https://samsungtizenos.com/"#content-retrieve-battery-information\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Retrieve battery information<\/h2>\n<p><a name=\"battery\"><\/a>\nTo retrieve battery information, follow the steps below:<\/p>\n<ul>\n<li>\n<p>Get the battery charge percentage with the <code>Percent<\/code> property of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Battery.md/">Tizen.System.Battery class.<\/p>\n<p>The property contains the current battery charge percentage as an integer value from 0 to 100 that indicates the remaining battery charge as a percentage of the maximum level:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">s_Percent<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">s_Percent <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Battery.Percent;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Get the current battery charging state with the <code>IsCharging<\/code> property.<\/p>\n<p>The property contains the device battery charging state as <code>TRUE<\/code> or <code>FALSE<\/code>:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">bool<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">charging<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">charging <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Battery.IsCharging;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Get the current battery level with the <code>Level<\/code> property.<\/p>\n<p>The property contains the device battery level as a value of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.BatteryLevelStatus.md/">Tizen.System.BatteryLevelStatus enumeration:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">BatteryLevelStatus<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">status<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">status <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Battery.Level;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Get the current device's power source with the <code>PowerSource<\/code> property.<\/p>\n<p>The property contains the device power source type as a value of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.BatteryPowerSource.md/">Tizen.System.BatteryPowerSources enumeration:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">BatteryPowerSource<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">PowerSourceType<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">PowerSourceType <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Battery.PowerSource;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<\/ul>\n<p><a name=\"display\"><\/a><\/p>\n<h2 id=\"content-control-the-display\"><a href=https://samsungtizenos.com/"#content-control-the-display\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Control the display<\/h2>\n<p>To retrieve and set display properties, follow these steps:<\/p>\n<ul>\n<li>\n<p>Get the number of display devices with the <code>NumberOfDisplays<\/code> property of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Display.md/">Tizen.System.Display class:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">num<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">num <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Display.NumberOfDisplays;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Get the maximum possible brightness with the <code>MaxBrightness<\/code> property:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Display<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">dis<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Display.Displays[<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">0<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">];<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">maxBrightness<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> dis.MaxBrightness;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Get and set the display brightness with the <code>Brightness<\/code> property:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Display<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">dis<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Display.Displays[<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">0<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">];<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">curBrightness<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">0<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">curBrightness <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> dis.Brightness;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">dis.Brightness <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">30<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Get and set the display state with the <code>State<\/code> property.<\/p>\n<p>The property contains the display state as a value of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.DisplayState.md/">Tizen.System.DisplayState enumeration:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">DisplayState<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">state<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">state <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Display.State;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Display.State <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> DisplayState.Normal;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<\/ul>\n<p><a name=\"haptic\"><\/a><\/p>\n<h2 id=\"content-control-haptic-devices\"><a href=https://samsungtizenos.com/"#content-control-haptic-devices\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Control haptic devices<\/h2>\n<p>To control haptic devices, follow these steps:<\/p>\n<ul>\n<li>\n<p>Get the number of haptic devices with the <code>NumberOfVibrators<\/code> property of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Vibrator.md/">Tizen.System.Vibrator class:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">num<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">num <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Vibrator.NumberOfVibrators;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Play and stop an effect on a given haptic device with the <code>Vibrate()<\/code> and <code>Stop()<\/code> methods.<\/p>\n<p>The device vibrates for a specified time with a constant intensity. The effect handle can be 0:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Vibrator<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">vib<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Vibrator.Vibrators[<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">0<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">];<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">vib.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Vibrate<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">3000<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">50<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">vib.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Stop<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<\/ul>\n<p><a name=\"ir\"><\/a><\/p>\n<h2 id=\"content-control-ir-devices\"><a href=https://samsungtizenos.com/"#content-control-ir-devices\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Control IR devices<\/h2>\n<p>To control an IR device, follow these steps:<\/p>\n<ul>\n<li>\n<p>Determine whether IR is available on the device using the <code>IsAvailable<\/code> property of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.IR.md/">Tizen.System.IR class:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">bool<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">test<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">test <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> IR.IsAvailable;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Transmit an IR pattern with a specific carrier frequency using the <code>Transmit()<\/code> method:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">List<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">&lt;<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">&gt; <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pattern<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">new<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">List<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">&lt;<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">pattern.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Add<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">10<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">pattern.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Add<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">50<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">IR.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Transmit<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">10<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, pattern);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<\/ul>\n<p><a name=\"led\"><\/a><\/p>\n<h2 id=\"content-control-led-devices\"><a href=https://samsungtizenos.com/"#content-control-led-devices\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Control LED devices<\/h2>\n<p>To control LEDs on the device, follow the steps below:<\/p>\n<ul>\n<li>\n<p>Get the maximum brightness value of a camera flash LED with the <code>MaxBrightness<\/code> property of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Led.md/">Tizen.System.Led class:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">test<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">test <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Led.MaxBrightness;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Get and set the current brightness value of a camera flash LED with the <code>Brightness<\/code> property:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">int<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">test<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">test <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Led.Brightness;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Led.Brightness <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">45<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Play and stop a custom effect on the service LED that is located on the front of the device with the <code>Play()<\/code> and <code>Stop()<\/code> methods:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">var<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">t<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Task.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Run<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">async<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">delegate<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">await<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Task.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Delay<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">1000<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">return<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">0<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">});<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Led.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Play<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">500<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">200<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, Color.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">FromRgba<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">255<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">255<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">255<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">1<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">));<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">t.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Wait<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Led.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Stop<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<\/ul>\n<p><a name=\"power\"><\/a><\/p>\n<h2 id=\"content-control-the-power-state\"><a href=https://samsungtizenos.com/"#content-control-the-power-state\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Control the power state<\/h2>\n<p>To lock and unlock the CPU state, follow the steps below:<\/p>\n<ul>\n<li>\n<p>Lock the power state with the <code>RequestLock()<\/code> method of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Power.md/">Tizen.System.Power class.<\/p>\n<p>The method locks the given PowerLock of the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.PowerLock.md/">Tizen.System.PowerLock enumeration for a specified time. After the given time (in milliseconds), the lock is unlocked. If the process is destroyed, every lock is removed:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Power.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">RequestLock<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(PowerLock.Cpu, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">2000<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Unlock the power state with the <code>ReleaseLock()<\/code> method:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Power.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">ReleaseLock<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(PowerLock.Cpu);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<\/ul>\n<p><a name=\"changes\"><\/a><\/p>\n<h2 id=\"content-monitor-device-changes\"><a href=https://samsungtizenos.com/"#content-monitor-device-changes\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Monitor device changes<\/h2>\n<p>To monitor device changes, use event handlers registered to the following events:<\/p>\n<ul>\n<li><code>LevelChanged<\/code> and <code>PercentChanged<\/code> events in the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Battery.md/">Tizen.System.Battery class are called when the battery level and charge percentage change.<\/li>\n<li><code>ChargingStateChanged<\/code> event in the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Battery.md/">Tizen.System.Battery class is called when the charger is connected or disconnected.<\/li>\n<li><code>StateChanged<\/code> event in the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Display.md/">Tizen.System.Display class is called when the device display state changes.<\/li>\n<li><code>BrightnessChanged<\/code> event in the <a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Led.md/">Tizen.System.Led class is called when LED brightness changes.<\/li>\n<\/ul>\n<p>To manage device display status change events, follow these steps:<\/p>\n<ol>\n<li>\n<p>Define an event handler:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">public<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">static<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">void<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">DisplayEventHandler<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">EventHandler<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">&lt;<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">DisplayStateChangedEventArgs<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">&gt; <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">handler<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">null<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> handler <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> (<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">object<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> sender, DisplayStateChangedEventArgs args);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> Log.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Debug<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(LogTag, <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">string<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Format<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">&quot;Display State:: {0}&quot;<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, value));<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>Register the event handler for the <code>StateChanged<\/code> event of the <code>Tizen.System.Display<\/code> class:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Display.StateChanged <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">+=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> handler;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<li>\n<p>When no longer needed, deregister the event handler:<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Display.StateChanged <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">-=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> handler;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<\/li>\n<\/ol>\n<h2 id=\"content-related-information\"><a href=https://samsungtizenos.com/"#content-related-information\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Related information<\/h2>\n<ul>\n<li>Dependencies\n<ul>\n<li>Tizen 4.0 and Higher<\/li>\n<\/ul>\n<\/li>\n<li>API References\n<ul>\n<li><a href=https://samsungtizenos.com/"//application//dotnet//api//TizenFX//latest//api//Tizen.System.Battery.md/">Tizen.System.Battery/n
  • Tizen.System.Display/n
  • Tizen.System.Vibrator/n
  • Tizen.System.IR/n
  • Tizen.System.Led/n/n/n/n","table_of_content":"
  • For the best experience,
    Please visit us from a computer

    Copyright © 2026 SAMSUNG. All rights reserved.

    Customize your cookie preferences

    You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

    Necessary

    These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

    Always on

    Analytics

    These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

    Enable analytics cookies
    Public Forum Public Forum
    Employees only. Please sign in with your company account.