// Path: app/src/main/java/com/turo/ktalk/InitApplication.java
// public class InitApplication extends Application {
// 
//     private static Context mContext;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         //初始化EaseUI
//         EMOptions options = new EMOptions();
//         options.setAcceptInvitationAlways(false);//设置需要同意后才接受邀请
//         options.setAutoAcceptGroupInvitation(false);//设置需要同意后才能进行群邀请
// 
//         EaseUI.getInstance().init(this,options);
// 
//         //初始化数据模型层类
//         Model.getInstance().init(this);
// 
//         //初始化全局上下文对象
//         mContext = this;
//     }
// 
//     // 获取全局上下文对象
//     public static Context getGlobalApplication(){
//         return mContext;
//     }
// }


import android.content.Context;
import android.content.SharedPreferences;
import com.turo.ktalk.InitApplication;
package com.turo.ktalk.utils;



/**
 * Created by YQ950209 on 2017/5/3.
 */
//保存，获取数据
public class SpUtils {
    public static final String IS_NEW_INVITE = "is_new_invite";// 新的邀请标记
    private static SpUtils instance = new SpUtils();
    private static SharedPreferences mSharedPreferences;

    private SpUtils(){

    }

    //单例
    public static SpUtils getInstance(){

        if (mSharedPreferences == null){
// Path: app/src/main/java/com/turo/ktalk/InitApplication.java
// public class InitApplication extends Application {
// 
//     private static Context mContext;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         //初始化EaseUI
//         EMOptions options = new EMOptions();
//         options.setAcceptInvitationAlways(false);//设置需要同意后才接受邀请
//         options.setAutoAcceptGroupInvitation(false);//设置需要同意后才能进行群邀请
// 
//         EaseUI.getInstance().init(this,options);
// 
//         //初始化数据模型层类
//         Model.getInstance().init(this);
// 
//         //初始化全局上下文对象
//         mContext = this;
//     }
// 
//     // 获取全局上下文对象
//     public static Context getGlobalApplication(){
//         return mContext;
//     }
// }


// Path: app/src/main/java/com/turo/ktalk/utils/SpUtils.java
import android.content.Context;
import android.content.SharedPreferences;
import com.turo.ktalk.InitApplication;

package com.turo.ktalk.utils;



/**
 * Created by YQ950209 on 2017/5/3.
 */
//保存，获取数据
public class SpUtils {
    public static final String IS_NEW_INVITE = "is_new_invite";// 新的邀请标记
    private static SpUtils instance = new SpUtils();
    private static SharedPreferences mSharedPreferences;

    private SpUtils(){

    }

    //单例
    public static SpUtils getInstance(){

        if (mSharedPreferences == null){
            mSharedPreferences = InitApplication.getGlobalApplication().getSharedPreferences("im", Context.MODE_PRIVATE);