System Settings

You can access the system configuration related to user preferences, such as ringtone, wallpaper, and font using system settings.

The main features of the Tizen.System.SystemSettings class include the following:

Prerequisites

To enable your application to use the system setting functionality, follow these steps:

  1. To use the Tizen.System.SystemSettings class, the application has to request permission by adding the following privilege to the tizen-manifest.xml file:

    XML
    Copy
    <privileges> <privilege>http://tizen.org/privilege/systemsettings.admin</privilege> </privileges>
  2. To make your application visible on the official site for Tizen applications only for devices that support the system setting features, add the following feature key to the tizen-manifest.xml file:

    XML
    Copy
    <!--To use the WallpaperHomeScreen property and WallpaperHomeScreenChanged event--> <feature name="http://tizen.org/feature/systemsetting.home_screen"/>

    To use all the properties and events of Tizen.System.SystemSettings class, add the following feature key to the tizen-manifest.xml file:

    XML
    Copy
    <feature name="http://tizen.org/feature/systemsetting"/>

    The following table lists the feature keys required by the specific properties and events of the Tizen.System.SystemSettings class.

    Table: Feature keys related to system settings

    You can scroll this table.
    Feature key Property Event
    http://tizen.org/feature/network.wifi NetworkWifiNotificationEnabled NetworkWifiNotificationSettingChanged
    http://tizen.org/feature/network.telephony UltraDataSave, AutomaticTimeUpdate UltraDataSaveChanged, UltraDataSavePackageListChanged, AutomaticTimeUpdateChangedEventArgs
    http://tizen.org/feature/accessibility.grayscale AccessibilityGrayscale AccessibilityGrayscaleChanged
    http://tizen.org/feature/accessibility.negative AccessibilityNegativeColor AccessibilityNegativeColorChanged
    http://tizen.org/feature/systemsetting.font DefaultFontType, FontType, FontSize FontSizeChanged, FontTypeChanged
    http://tizen.org/feature/systemsetting.home_screen WallpaperHomeScreen WallpaperHomeScreenChanged
    http://tizen.org/feature/systemsetting.incoming_call IncomingCallRingtone, SoundNotification IncomingCallRingtoneChanged, SoundNotificationChanged
    http://tizen.org/feature/systemsetting.lock_screen LockscreenApp, WallpaperLockScreen LockScreenAppChanged, WallpaperLockScreenChanged
    http://tizen.org/feature/systemsetting.notification_email EmailAlertRingtone EmailAlertRingtoneChanged

    You can also check whether a device supports a given feature using the TryGetValue() method of the Tizen.System.Information class, and accordingly handle the code when a feature is supported and not supported:

    C#
    Copy
    const string HOME_SCREEN_FEATURE_KEY = "http://tizen.org/feature/systemsetting.home_screen"; bool ret; if (Information.TryGetValue<bool>(HOME_SCREEN_FEATURE_KEY, out ret) == false) { /// Error handling }
    Note

    In TV applications, you can test the system settings functionality on an emulator only. Most target devices do not currently support this feature.

  3. To use the methods and properties of the Tizen.System.SystemSettings class, include the Tizen.System namespace in your application:

    C#
    Copy
    using Tizen.System;

Retrieve system settings

You can retrieve system settings with the properties of the Tizen.System.SystemSettings class.

To retrieve, for example, the ringtone for incoming calls, use the Tizen.System.SystemSettings.IncomingCallRingtone property:

C#
Copy
var getValue = Tizen.System.SystemSettings.IncomingCallRingtone;

Monitor system setting changes

You can set up notifications about system setting changes by defining event handlers and registering them for the Tizen.System.SystemSettings class events.

To monitor, for example, when the ringtone for incoming calls changes:

  1. Define the event handler and register it for the IncomingCallRingtoneChanged event:

    C#
    Copy
    private static void OnIncomingCallRingtoneChanged(object sender, Tizen.System.IncomingCallRingtoneChangedEventArgs e) { Assert.IsInstanceOf<string>(e.Value, "OnIncomingCallRingtoneChanged: IncomingCallRingtone not an instance of string"); } Tizen.System.SystemSettings.IncomingCallRingtoneChanged += OnIncomingCallRingtoneChanged;
  2. When you no longer need the event handler, deregister it:

    C#
    Copy
    Tizen.System.SystemSettings.IncomingCallRingtoneChanged -= OnIncomingCallRingtoneChanged;
  • Dependencies
    • Tizen 4.0 and Higher
System Information
Next Sound and Vibration Feedback
Submit your feedback to GitHub