[Android Software/Hacking General [Developers Only]] Androguide.fr:
I did, sorry. I've been trying to get it to work the right way since I had your pm but couldn't manage to make it avoid asking for root permissions everytime :s

In fact I'm calling the sharedPrefs in onPause() and onResume() instead of onCreate() like in the corrected code you sent me, but it works too.

Couldn't manage to get your if (! loaded) method to work though (as you guessed I'm a real beginner in java).

Anyway it's no big deal if it calls the root permissions everytime, I can work around this by adding an "Apply Changes" button below the toggles, this way root is called only if the apply button is clicked.

But now I'm stuck with saving the RadioGroup state in the sharedPrefs... It's getting saved properly but I can't manage to call them :(

Here's what I do :

public class Multitasking extends Activity {

private SharedPreferences MuPrefs;

public static final String PREFS_NAME = "SharedPrefsMultitasking";
public static final String PREF_OOM = "oom";
public static final String PREF_OOM1 = "oom1";
public static final String PREF_OOM2 = "oom2";

private RadioGroup oom;
private RadioButton oom0;
private RadioButton oom1;
private RadioButton oom2;

Button Apply = null;

public int OOM = 0;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_multitasking);

MuPrefs = getSharedPreferences(PREFS_NAME, 0);

Apply = (Button)findViewById(R.id.button1);

Apply.setOnClickListener(ApplyListener);

oom = (RadioGroup)this.findViewById(R.id.radioGroup1);
oom.setOnCheckedChangeListener(radiochecker);

}

final OnCheckedChangeListener radiochecker = new OnCheckedChangeListener() {
public void onCheckedChanged(RadioGroup group, int checkedId) {

if(checkedId==R.id.oom0){

OOM = 1;

Editor enable = MuPrefs.edit();
enable.putBoolean(PREF_OOM, checkedId==R.id.oom0);
enable.commit();

}else if(checkedId==R.id.oom1){

OOM = 2;

Editor enable = MuPrefs.edit();
enable.putBoolean(PREF_OOM, checkedId==R.id.oom0);
enable.commit();

}else if(checkedId==R.id.oom2){

OOM = 3;

Editor enable = MuPrefs.edit();
enable.putBoolean(PREF_OOM, checkedId==R.id.oom0);
enable.commit();

}
}

};

private OnClickListener ApplyListener = new View.OnClickListener() {

@Override
public void onClick(View v) {

if (OOM == 1) {
// Apply the tweak n°1
}

if (OOM == 2) {
// Apply the tweak n°2
}

if (OOM == 3) {
// Apply the tweak n°3
}
};

[B] // Here I don't know how to call the prefs on onPause() and onResume(), I know it's not setChecked() but I don't what to put instead[/B]

@Override
protected void onPause() {
oom.setChecked(MuPrefs.getBoolean(PREF_OOM, false));
super.onPause();
oom1.setChecked(MuPrefs.getBoolean(PREF_OOM1, false));
super.onPause();
oom2.setChecked(MuPrefs.getBoolean(PREF_OOM2, false));
super.onPause();
}

@Override
protected void onResume() {
oom.setChecked(MuPrefs.getBoolean(PREF_OOM, false));
super.onResume();
oom1.setChecked(MuPrefs.getBoolean(PREF_OOM1, false));
super.onResume();
oom2.setChecked(MuPrefs.getBoolean(PREF_OOM2, false));
super.onResume();
}

Would you mind if we could catch-up on SquadEdit so we could chat and you could show me in real-time ?

Thanks for all your help dude :good: