Android SystemSetting Handler

From wiki.gpii
Jump to: navigation, search

Modules

SystemSetting Handler is formed by diferents apps althought it is just a module. This is beacause some params need special permissions to modify them (Root permissions to wirte or System app ). Also, the diferent android versions provoke diferents access methods for special params, so we have been developed four apps to solve this problems. The modules are the following:

  • SystemSettingHandler: For devices with Android 4.0 (ICS) or more and access to non special functionalities. It should install as normal app.
  • SystemSettingHandlerRoot: For devices with Android 4.0 (ICS) or more and access to special functionalities. It should install as system app (Push the apk file in /system/app).
  • SystemSettingHandlerPreICS: For devices with Android version before Android 4.0 (ICS) and access to non special functionalities. It should install as normal app.
  • SystemSettingHandlerPreICSRoot: For devices with Android version before Android 4.0 (ICS) or more and access to special functionalities. It should install as system app (Push the apk file in /system/app).

The Orchestrator is the responsable to invoke each SystemSetting app based on the Android version which is running on device and if the specific configuration params needs special permissions or not.

Params

The params are a set of key/value, where the key is an idenfier of what we want change, and the value should be one of the possible values. Following you can see the dictionary of params for each SystemSettingHandler at current version:

SystemSettingHandler

ICS or + && No System app


Key Value Description
brightness_mode 1 =AUTOMATIC, 0= MANUAL
brightness (min 0 – 255 max)
screen_time_off Time in milliseconds
dim_screen 0=no 1=yes
haptic_feedback 0=no 1=yes Enable he haptic feedback (long presses, ...)
auto_rotation 0=no 1=yes
default_rotation 0=0 Degree 1= 90 Degree 2=180 Degree 3= 270 Degree

Default screen rotation when no other policy applies. When ACCELEROMETER_ROTATION is zero and no on-screen Activity expresses a preference, this rotation value will be used.

sound_effects 0=no 1=yes
music_volume 0-15
alarm_volume 0-7
dtmf_volume 0-15
notification_volume 0-7
ring_volume 0-7
system_volume 0-7
voice_call_volume 0-5
notification_sound File url (Ogg or Mp3) Download the file, and put it as default notification sound
ringtone_sound File url Download the file, and put it as default ringtone sound

SystemSettingHandlerRoot

ICS or + && System app


Key Value Description
enable_accessibility 0=no 1=yes
add_accessibility_service packageName/AccessibilityServiceName EXAMPLE: To add talkback: com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService:
remove_accessibility_service packageName/AccessibilityServiceName EXAMPLE: To add talkback: com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService:
default_ime Package name/IME class name EXAMPLE: To add Tecla: ca.idi.tekla/.ime.TeclaIME
touch_mode 0=no 1=yes
tts_engine Package name EXAMPLE: to enable the google tts:

com.google.android.tss||

tts_rate 0-500 Default value is 100
tts_pitch 0-500 Default value is 100
lock_sound
  • UNO a 250 Hz = "Tono1-250.ogg"
  • DOS a 250 Hz = "Tono2-250.ogg"
  • TRES a 250 Hz = "Tono3-250.ogg"
  • UNO a 600Hz = "Tono1-600.ogg"
  • DOS a 600 Hz = "Tono2-600.ogg"
  • UNO a 1000 Hz = "Tono1-1000.ogg"
  • DOS a 1000 Hz = "Tono2-1000.ogg"

Modify the sound when the screen is locked. (effects sound enable)

unlock_sound
  • UNO a 250 Hz = "Tono1-250.ogg"
  • DOS a 250 Hz = "Tono2-250.ogg"
  • TRES a 250 Hz = "Tono3-250.ogg"
  • UNO a 600Hz = "Tono1-600.ogg"
  • DOS a 600 Hz = "Tono2-600.ogg"
  • UNO a 1000 Hz = "Tono1-1000.ogg"
  • DOS a 1000 Hz = "Tono2-1000.ogg"
Modify the sound when the screen is unlocked (effects sound enable)
low_battery
  • UNO a 250 Hz = "Tono1-250.ogg"
  • DOS a 250 Hz = "Tono2-250.ogg"
  • TRES a 250 Hz = "Tono3-250.ogg"
  • UNO a 600Hz = "Tono1-600.ogg"
  • DOS a 600 Hz = "Tono2-600.ogg"
  • UNO a 1000 Hz = "Tono1-1000.ogg"
  • DOS a 1000 Hz = "Tono2-1000.ogg"
Modify the sound when the device launch low battery notification (effects sound enable)
tick_sound
  • UNO a 250 Hz = "Tono1-250.ogg"
  • DOS a 250 Hz = "Tono2-250.ogg"
  • TRES a 250 Hz = "Tono3-250.ogg"
  • UNO a 600Hz = "Tono1-600.ogg"
  • DOS a 600 Hz = "Tono2-600.ogg"
  • UNO a 1000 Hz = "Tono1-1000.ogg"
  • DOS a 1000 Hz = "Tono2-1000.ogg"
Modify the sound when perform a tick on the device (effects sound enable).
font_scale 0.5-2.0
regular_font url (local or remote) where is the ttf file
bold_font url (local or remote) where is the ttf file
italic_font url (local or remote) where is the ttf file

SystemSettingHandlerPREICS

FROYO-ICS && No System app


Key Value Description
brightness_mode 1 =AUTOMATIC, 0= MANUAL
brightness (min 0 – 255 max)
screen_time_off Time in seconds
dim_screen 0=no 1=yes
haptic_feedback 0=no 1=yes Enable he haptic feedback (long presses, ...)
auto_rotation 0=no 1=yes
default_rotation 0=0 Degree 1= 90 Degree 2=180 Degree 3= 270 Degree

Default screen rotation when no other policy applies. When ACCELEROMETER_ROTATION is zero and no on-screen Activity expresses a preference, this rotation value will be used.

sound_effects 0=no 1=yes
music_volume 0-15
alarm_volume 0-7
dtmf_volume 0-15
notification_volume 0-7
ring_volume 0-7
system_volume 0-7
voice_call_volume 0-5
notification_sound File url (Ogg or Mp3) Download the file, and put it as default notification sound
ringtone_sound File url Download the file, and put it as default ringtone sound
font_scale 0.5-2.0

SystemSettingHandlerPREICSRoot

Froyo - ICS && System app



Key Value Description
enable_accessibility 0=no 1=yes
add_accessibility_service packageName/AccessibilityServiceName EXAMPLE: To add talkback: com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService:
remove_accessibility_service packageName/AccessibilityServiceName EXAMPLE: To add talkback: com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService:
default_ime Package name/IME class name EXAMPLE: To add Tecla: ca.idi.tekla/.ime.TeclaIME
tts_engine Package name EXAMPLE: to enable the google tts:

com.google.android.tss

tts_rate 0-500 Default value is 100
tts_pitch 0-500 Default value is 100
lock_sound
  • UNO a 250 Hz = "Tono1-250.ogg"
  • DOS a 250 Hz = "Tono2-250.ogg"
  • TRES a 250 Hz = "Tono3-250.ogg"
  • UNO a 600Hz = "Tono1-600.ogg"
  • DOS a 600 Hz = "Tono2-600.ogg"
  • UNO a 1000 Hz = "Tono1-1000.ogg"
  • DOS a 1000 Hz = "Tono2-1000.ogg"

Modify the sound when the screen is locked. (effects sound enable)

unlock_sound
  • UNO a 250 Hz = "Tono1-250.ogg"
  • DOS a 250 Hz = "Tono2-250.ogg"
  • TRES a 250 Hz = "Tono3-250.ogg"
  • UNO a 600Hz = "Tono1-600.ogg"
  • DOS a 600 Hz = "Tono2-600.ogg"
  • UNO a 1000 Hz = "Tono1-1000.ogg"
  • DOS a 1000 Hz = "Tono2-1000.ogg"
Modify the sound when the screen is unlocked (effects sound enable)
low_battery
  • UNO a 250 Hz = "Tono1-250.ogg"
  • DOS a 250 Hz = "Tono2-250.ogg"
  • TRES a 250 Hz = "Tono3-250.ogg"
  • UNO a 600Hz = "Tono1-600.ogg"
  • DOS a 600 Hz = "Tono2-600.ogg"
  • UNO a 1000 Hz = "Tono1-1000.ogg"
  • DOS a 1000 Hz = "Tono2-1000.ogg"
Modify the sound when the device launch low battery notification (effects sound enable)
tick_sound
  • UNO a 250 Hz = "Tono1-250.ogg"
  • DOS a 250 Hz = "Tono2-250.ogg"
  • TRES a 250 Hz = "Tono3-250.ogg"
  • UNO a 600Hz = "Tono1-600.ogg"
  • DOS a 600 Hz = "Tono2-600.ogg"
  • UNO a 1000 Hz = "Tono1-1000.ogg"
  • DOS a 1000 Hz = "Tono2-1000.ogg"
Modify the sound when perform a tick on the device (effects sound enable).
regular_font url (local or remote) where is the ttf file
bold_font url (local or remote) where is the ttf file
italic_font url (local or remote) where is the ttf file

GitHub Repository

A version of Android SystemSettings Handlers can be found at GitHub

Related Pages and Useful Links

Back to Android Overview