// Path: SDK/appwoodoo/src/main/java/com/appwoodoo/sdk/storage/SharedPreferencesHelper.java
// public final class SharedPreferencesHelper {
// 
// 	private static SharedPreferencesHelper _instance;
// 	private static SharedPreferences sp;
// 
// 	private SharedPreferencesHelper() {}
// 	
// 	public static SharedPreferencesHelper getInstance() {
// 		synchronized(SharedPreferencesHelper.class) {
// 			if (_instance == null) {
// 				_instance = new SharedPreferencesHelper();
// 			}
// 		}
// 		return _instance;
// 	}
// 
// 	public SharedPreferences getSharedPreferences(Context context) {
// 		if (sp == null) {
// 			String PREFERENCES_ID = "APPWOODOO_SHARED_PREFERENCES";
// 			sp = context.getSharedPreferences(PREFERENCES_ID, 0);
// 		}
// 		return sp;
// 	}
// 
// 	public void storeValue(SharedPreferences preferences, String key, Object value) {
// 		SharedPreferences.Editor edit = preferences.edit();
// 		if (value == null) {
// 			edit.remove(key);
// 		} else if (value instanceof String) {
// 			edit.putString(key, (String) value);
// 		} else if (value instanceof Integer) {
// 			edit.putInt(key, (Integer) value);
// 		}
// 		edit.apply();
// 	}
// 	
// 	public String getStoredString(SharedPreferences preferences, String key) {
// 		return preferences.getString(key, "");
// 	}
// 
// 	public Integer getStoredInteger(SharedPreferences preferences, String key) {
// 		if (!preferences.contains(key)) {
// 			return null;
// 		}
// 		return preferences.getInt(key, 0);
// 	}
// }


import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.FragmentManager;
import android.support.v7.appcompat.BuildConfig;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.appwoodoo.sdk.storage.SharedPreferencesHelper;
import java.net.URL;
	    	at.execute((Void) null);
        }

        builder.setView(linearLayout);

        if (dialogData.getTitle() != null) {
            LinearLayout titleLayout = new LinearLayout(getContext());
            LinearLayout.LayoutParams titleLayoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            titleLayout.setLayoutParams(titleLayoutParams);
            linearLayout.setPadding(0, 0, 0, 0);
            titleLayout.setOrientation(LinearLayout.VERTICAL);

            TextView titleText = new TextView(getContext());
            LinearLayout.LayoutParams titleParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            titleText.setLayoutParams(titleParams);
            titleParams.setMargins(35, 20, 35, 15);
            titleText.setPadding(5, 5, 5, 5);
            titleText.setGravity(Gravity.LEFT);
            titleText.setTextSize(26);
            titleText.setTextColor( DialogsHelper.getInstance().getViewOptions().getDialogTitleColour() );
            if (typeface != null) {
                titleText.setTypeface(typeface);
            }
            titleText.setText(dialogData.getTitle());

            titleLayout.addView(titleText);

            builder.setCustomTitle(titleLayout);
	    }

// Path: SDK/appwoodoo/src/main/java/com/appwoodoo/sdk/storage/SharedPreferencesHelper.java
// public final class SharedPreferencesHelper {
// 
// 	private static SharedPreferencesHelper _instance;
// 	private static SharedPreferences sp;
// 
// 	private SharedPreferencesHelper() {}
// 	
// 	public static SharedPreferencesHelper getInstance() {
// 		synchronized(SharedPreferencesHelper.class) {
// 			if (_instance == null) {
// 				_instance = new SharedPreferencesHelper();
// 			}
// 		}
// 		return _instance;
// 	}
// 
// 	public SharedPreferences getSharedPreferences(Context context) {
// 		if (sp == null) {
// 			String PREFERENCES_ID = "APPWOODOO_SHARED_PREFERENCES";
// 			sp = context.getSharedPreferences(PREFERENCES_ID, 0);
// 		}
// 		return sp;
// 	}
// 
// 	public void storeValue(SharedPreferences preferences, String key, Object value) {
// 		SharedPreferences.Editor edit = preferences.edit();
// 		if (value == null) {
// 			edit.remove(key);
// 		} else if (value instanceof String) {
// 			edit.putString(key, (String) value);
// 		} else if (value instanceof Integer) {
// 			edit.putInt(key, (Integer) value);
// 		}
// 		edit.apply();
// 	}
// 	
// 	public String getStoredString(SharedPreferences preferences, String key) {
// 		return preferences.getString(key, "");
// 	}
// 
// 	public Integer getStoredInteger(SharedPreferences preferences, String key) {
// 		if (!preferences.contains(key)) {
// 			return null;
// 		}
// 		return preferences.getInt(key, 0);
// 	}
// }


// Path: SDK/appwoodoo/src/main/java/com/appwoodoo/sdk/dialogs/DialogFragment.java
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.FragmentManager;
import android.support.v7.appcompat.BuildConfig;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.appwoodoo.sdk.storage.SharedPreferencesHelper;
import java.net.URL;

	    	at.execute((Void) null);
        }

        builder.setView(linearLayout);

        if (dialogData.getTitle() != null) {
            LinearLayout titleLayout = new LinearLayout(getContext());
            LinearLayout.LayoutParams titleLayoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            titleLayout.setLayoutParams(titleLayoutParams);
            linearLayout.setPadding(0, 0, 0, 0);
            titleLayout.setOrientation(LinearLayout.VERTICAL);

            TextView titleText = new TextView(getContext());
            LinearLayout.LayoutParams titleParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            titleText.setLayoutParams(titleParams);
            titleParams.setMargins(35, 20, 35, 15);
            titleText.setPadding(5, 5, 5, 5);
            titleText.setGravity(Gravity.LEFT);
            titleText.setTextSize(26);
            titleText.setTextColor( DialogsHelper.getInstance().getViewOptions().getDialogTitleColour() );
            if (typeface != null) {
                titleText.setTypeface(typeface);
            }
            titleText.setText(dialogData.getTitle());

            titleLayout.addView(titleText);

            builder.setCustomTitle(titleLayout);
	    }

		SharedPreferences preferences = SharedPreferencesHelper.getInstance().getSharedPreferences(getContext());