最简单的数据库操作

import android.provider.Settings;


public int getVal()
{

    return Settings.Secure.getInt(this.getContentResolver(),
   Settings.Secure.ETH_ON, 0);
}

public void setVal(int val)
{
    Settings.Secure.putInt(cr, Settings.Secure.ETH_ON,val);

}

你可能感兴趣的:(android)