eu.easypush.pushlibrary.preferences.EasypushPreferences Maven / Gradle / Ivy
The newest version!
package eu.easypush.pushlibrary.preferences;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import eu.easypush.pushlibrary.R;
import eu.easypush.pushlibrary.tasks.AddDeviceProjectTask;
public class EasypushPreferences extends PreferenceActivity implements
OnSharedPreferenceChangeListener {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.easypush_preferences);
PreferenceManager.getDefaultSharedPreferences(this)
.registerOnSharedPreferenceChangeListener(this);
}
@Override
public void onSharedPreferenceChanged(SharedPreferences arg0, String arg1) {
new AddDeviceProjectTask(this).execute();
}
}