Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference b/w Settings.Global ,Settings.System and Settings.Secure in android

Tags:

android

There are 3 inner classes in android.provider.Settings:

  1. Global
  2. System
  3. Secure

Each class has a different type of Preference. Can someone explain the role/scope of each of these classes?

like image 602
ajay Avatar asked Mar 14 '16 13:03

ajay


2 Answers

Settings.Global was introduced in API 17, and now contains some values that were previously stored in Settings.System.

e.g. prior to API 17, the Device Name was stored in Settings.System, and now it is stored in Settings.Global.

(see related post for info on that: Android : Get “device name” on android tv)

like image 176
Richard Le Mesurier Avatar answered Sep 28 '22 04:09

Richard Le Mesurier


Settings.Secure is same like Settings.Global Both are can be modified only by Settings apps or SystemUI app and other apps can read them Only difference is that Global will be applied to all users

On the other hand Settings.System can be modified by apps that uses dynamic preferences or other system apps

like image 41
Nitin Rahoria Avatar answered Sep 28 '22 05:09

Nitin Rahoria