// Path: app/src/main/java/com/game/dhanraj/myownalexa/sharedpref/Util.java
// public class Util {
// 
//     private static SharedPreferences mPreferences;
//     private static final String IDENTIFIER = "identifier";
//     private static OkHttpClient client;
// 
//     public static SharedPreferences getPrefernces(Context context){
//         if(mPreferences==null)
//         {
//             mPreferences = PreferenceManager.getDefaultSharedPreferences(context);
//         }
//         return mPreferences;
//     }
// 
//     private static String getIdentifier() {
//         return (mPreferences!=null)?mPreferences.getString(IDENTIFIER,""):"";
//     }
// 
//     public static String getUuid() {
//         String prefix=(TextUtils.isEmpty(getIdentifier()))?"":getIdentifier()+".";
//         return prefix + UUID.randomUUID().toString();
//     }
// 
//     public static OkHttpClient getOkhttp() {
//         if (client == null)
//             client = new OkHttpClient();
//         return client;
//     }
// 
// 
// }
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String PREF_ACCESS_TOKEN = "access_token_042017";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String PREF_REFRESH_TOKEN = "refresh_token_042017";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String PREF_TOKEN_EXPIRES = "token_expires_042017";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/sharedpref/Util.java
// public static OkHttpClient getOkhttp() {
//     if (client == null)
//         client = new OkHttpClient();
//     return client;
// }


import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.util.Log;
import com.game.dhanraj.myownalexa.sharedpref.Util;
import com.google.gson.Gson;
import org.greenrobot.eventbus.EventBus;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.FormBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import static com.game.dhanraj.myownalexa.Constants.PREF_ACCESS_TOKEN;
import static com.game.dhanraj.myownalexa.Constants.PREF_REFRESH_TOKEN;
import static com.game.dhanraj.myownalexa.Constants.PREF_TOKEN_EXPIRES;
import static com.game.dhanraj.myownalexa.sharedpref.Util.getOkhttp;
package com.game.dhanraj.myownalexa;







/**
 * Created by dhanraj on 16/7/17.
 */

public class TokenHandler {

    public Context myContext;
    public String myresponse;
    private String REFRESH_TOKEN;
    private String ACCESS_TOKEN;

    public static final int FirstMainActivityDoPostRequest = 101;
    public static final int DownChannelCase1 = 102;
    public static final int DownChannelCase2 = 103;
    public static final int DownChannelCase3 = 104;
    public static final int SendAudioRequest = 105;
    public static final int SendSpeechFinishedEvent=106;
    public static final int SendSpeechStartedEvent=107;
    public static final int SendPlaybackStartedEvent = 108;
// Path: app/src/main/java/com/game/dhanraj/myownalexa/sharedpref/Util.java
// public class Util {
// 
//     private static SharedPreferences mPreferences;
//     private static final String IDENTIFIER = "identifier";
//     private static OkHttpClient client;
// 
//     public static SharedPreferences getPrefernces(Context context){
//         if(mPreferences==null)
//         {
//             mPreferences = PreferenceManager.getDefaultSharedPreferences(context);
//         }
//         return mPreferences;
//     }
// 
//     private static String getIdentifier() {
//         return (mPreferences!=null)?mPreferences.getString(IDENTIFIER,""):"";
//     }
// 
//     public static String getUuid() {
//         String prefix=(TextUtils.isEmpty(getIdentifier()))?"":getIdentifier()+".";
//         return prefix + UUID.randomUUID().toString();
//     }
// 
//     public static OkHttpClient getOkhttp() {
//         if (client == null)
//             client = new OkHttpClient();
//         return client;
//     }
// 
// 
// }
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String PREF_ACCESS_TOKEN = "access_token_042017";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String PREF_REFRESH_TOKEN = "refresh_token_042017";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/Constants.java
// public final static String PREF_TOKEN_EXPIRES = "token_expires_042017";
// 
// Path: app/src/main/java/com/game/dhanraj/myownalexa/sharedpref/Util.java
// public static OkHttpClient getOkhttp() {
//     if (client == null)
//         client = new OkHttpClient();
//     return client;
// }


// Path: app/src/main/java/com/game/dhanraj/myownalexa/TokenHandler.java
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.util.Log;
import com.game.dhanraj.myownalexa.sharedpref.Util;
import com.google.gson.Gson;
import org.greenrobot.eventbus.EventBus;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.FormBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import static com.game.dhanraj.myownalexa.Constants.PREF_ACCESS_TOKEN;
import static com.game.dhanraj.myownalexa.Constants.PREF_REFRESH_TOKEN;
import static com.game.dhanraj.myownalexa.Constants.PREF_TOKEN_EXPIRES;
import static com.game.dhanraj.myownalexa.sharedpref.Util.getOkhttp;

package com.game.dhanraj.myownalexa;







/**
 * Created by dhanraj on 16/7/17.
 */

public class TokenHandler {

    public Context myContext;
    public String myresponse;
    private String REFRESH_TOKEN;
    private String ACCESS_TOKEN;

    public static final int FirstMainActivityDoPostRequest = 101;
    public static final int DownChannelCase1 = 102;
    public static final int DownChannelCase2 = 103;
    public static final int DownChannelCase3 = 104;
    public static final int SendAudioRequest = 105;
    public static final int SendSpeechFinishedEvent=106;
    public static final int SendSpeechStartedEvent=107;
    public static final int SendPlaybackStartedEvent = 108;
    public static final int SplashActivity = 109;