title: Can't modify Settings.Secure database in a 3rd app
body: <p>I want to modify something in Settings.secure database, just as the android Settings app do:</p>
  
  <pre><code>Settings.Secure.putString(
          getContentResolver(),
          Settings.Secure.VOICE_RECOGNITION_SERVICE,
          setting);
  </code></pre>
  
  <p>I have added following permission in AndroidManifest.xml:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.WRITE_SETTINGS" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" /&gt;
  </code></pre>
  
  <p>Unfortunately, the app aborts saying:</p>
  
  <blockquote>
    <p>E/DatabaseUtils(  147): Writing exception to parcel E/DatabaseUtils( 
    147): java.lang.SecurityException: Permission denial: writing to
    secure settings requires android.permission.WRITE_SECURE_SETTINGS
    E/DatabaseUtils(  147):         at
    com.android.providers.settings.SettingsProvider.checkWritePermissions(SettingsProvider.java:211)
    E/DatabaseUtils(  147):         at
    com.android.providers.settings.SettingsProvider.insert(SettingsProvider.java:552)
    E/DatabaseUtils(  147):         at
    android.content.ContentProvider$Transport.insert(ContentProvider.java:198)
    E/DatabaseUtils(  147):         at
    android.content.ContentProviderNative.onTransact(ContentProviderNative.java:146)
    E/DatabaseUtils(  147):         at
    android.os.Binder.execTransact(Binder.java:320) E/DatabaseUtils( 
    147):         at dalvik.system.NativeStart.run(Native Method)</p>
  </blockquote>
  
  <p>If I sign this app with the platform key it would be OK, but for different systems, the platform key seems different. It can't be run on other devices.</p>
  
  <p>How can I accomplish this?</p>