// Path: android/app/src/main/java/com/sample/utils/LocaleUtils.java
// public class LocaleUtils {
// 
//     public static Locale getDefault() {
//         if (null == Locale.getDefault()) { return Locale.US; }
//         return Locale.getDefault();
//     }
// 
//     public static String getServerLocale(Locale locale) {
//         if (null != locale) {
//             return locale.toString().replace("_", "-");
//         } else {
//             return "";
//         }
//     }
// 
//     public static String getDefaultLocaleForServer() {
//         Locale locale = getDefault();
//         return getServerLocale(locale);
//     }
// 
// 
// }
// 
// Path: android/app/src/main/java/com/sample/utils/LocaleUtils.java
// public class LocaleUtils {
// 
//     public static Locale getDefault() {
//         if (null == Locale.getDefault()) { return Locale.US; }
//         return Locale.getDefault();
//     }
// 
//     public static String getServerLocale(Locale locale) {
//         if (null != locale) {
//             return locale.toString().replace("_", "-");
//         } else {
//             return "";
//         }
//     }
// 
//     public static String getDefaultLocaleForServer() {
//         Locale locale = getDefault();
//         return getServerLocale(locale);
//     }
// 
// 
// }


import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import com.facebook.react.bridge.*;
import com.sample.utils.LocaleUtils;
import com.sample.utils.LocaleUtils;
import javax.annotation.Nullable;
import java.util.UUID;
            packageInfo = mApplication.getPackageManager().getPackageInfo(mApplication.getPackageName(), 0);
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }

        environment.putString("name", "debug");
        //environment.putString("name", BuildConfig.ENVIRONMENT);
        environment.putBoolean("simulator", Build.FINGERPRINT.startsWith("generic"));
        environment.putString("buildCode",  String.valueOf(packageInfo.versionCode));
        environment.putString("version", String.valueOf(packageInfo.versionName));
        environment.putString("uuid", getUuid());
        environment.putString("locale", LocaleUtils.getDefaultLocaleForServer());
        environment.putString("packageName", mApplication.getPackageName());
        environment.putInt("clientApplicationId", 95);
        environment.putString("osVersion", "Android " + android.os.Build.VERSION.RELEASE);
        environment.putString("phoneVersion", getPhoneVersion());
        environment.putString("apiKey", "ecd3641df005e2a911ca78ce6d56064212esdere");
        environment.putString("remoteAPIHost", getRemoteApiHostWithPort());

        callback.invoke(environment);
    }

    private boolean isRunningOnGenymotion() {
        return Build.FINGERPRINT.contains("vbox");
    }

    private boolean isRunningOnStockEmulator() {
        return Build.FINGERPRINT.contains("generic");
    }

// Path: android/app/src/main/java/com/sample/utils/LocaleUtils.java
// public class LocaleUtils {
// 
//     public static Locale getDefault() {
//         if (null == Locale.getDefault()) { return Locale.US; }
//         return Locale.getDefault();
//     }
// 
//     public static String getServerLocale(Locale locale) {
//         if (null != locale) {
//             return locale.toString().replace("_", "-");
//         } else {
//             return "";
//         }
//     }
// 
//     public static String getDefaultLocaleForServer() {
//         Locale locale = getDefault();
//         return getServerLocale(locale);
//     }
// 
// 
// }
// 
// Path: android/app/src/main/java/com/sample/utils/LocaleUtils.java
// public class LocaleUtils {
// 
//     public static Locale getDefault() {
//         if (null == Locale.getDefault()) { return Locale.US; }
//         return Locale.getDefault();
//     }
// 
//     public static String getServerLocale(Locale locale) {
//         if (null != locale) {
//             return locale.toString().replace("_", "-");
//         } else {
//             return "";
//         }
//     }
// 
//     public static String getDefaultLocaleForServer() {
//         Locale locale = getDefault();
//         return getServerLocale(locale);
//     }
// 
// 
// }


// Path: android/app/src/main/java/com/sample/EnvironmentManager.java
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import com.facebook.react.bridge.*;
import com.sample.utils.LocaleUtils;
import com.sample.utils.LocaleUtils;
import javax.annotation.Nullable;
import java.util.UUID;

            packageInfo = mApplication.getPackageManager().getPackageInfo(mApplication.getPackageName(), 0);
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }

        environment.putString("name", "debug");
        //environment.putString("name", BuildConfig.ENVIRONMENT);
        environment.putBoolean("simulator", Build.FINGERPRINT.startsWith("generic"));
        environment.putString("buildCode",  String.valueOf(packageInfo.versionCode));
        environment.putString("version", String.valueOf(packageInfo.versionName));
        environment.putString("uuid", getUuid());
        environment.putString("locale", LocaleUtils.getDefaultLocaleForServer());
        environment.putString("packageName", mApplication.getPackageName());
        environment.putInt("clientApplicationId", 95);
        environment.putString("osVersion", "Android " + android.os.Build.VERSION.RELEASE);
        environment.putString("phoneVersion", getPhoneVersion());
        environment.putString("apiKey", "ecd3641df005e2a911ca78ce6d56064212esdere");
        environment.putString("remoteAPIHost", getRemoteApiHostWithPort());

        callback.invoke(environment);
    }

    private boolean isRunningOnGenymotion() {
        return Build.FINGERPRINT.contains("vbox");
    }

    private boolean isRunningOnStockEmulator() {
        return Build.FINGERPRINT.contains("generic");
    }

    private String getRemoteApiHostWithPort() {