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;

public class Main {
    public static final String PREFERENCES_DECODING_TYPE = "app_decoding_type";
    public static final String KEY_DECODING_TYPE = "is_decoding_type_ffmpeg";

    public static void setDecodingType(Context context, boolean isFFMpeg) {
        if (context != null) {
            SharedPreferences sp = context.getSharedPreferences(PREFERENCES_DECODING_TYPE, Context.MODE_PRIVATE);
            sp.edit().putBoolean(KEY_DECODING_TYPE, isFFMpeg).commit();
        }
    }
}