Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

import android.preference.PreferenceManager;

public class Main {
    private final static String TYPE_SYSTEM_PRIMER = "system_primer_type_";

    public static void saveDefaultRingtone(Context context, int type, String id) {
        SharedPreferences mSharePref = PreferenceManager.getDefaultSharedPreferences(context);
        Editor mEditor = mSharePref.edit();
        mEditor.putString(TYPE_SYSTEM_PRIMER + type, id);
        mEditor.commit();
    }
}