SDKSettings.java 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. package com.yyrh.constant;
  2. import android.app.Activity;
  3. import android.content.Context;
  4. import com.yyrh.utils.Utils;
  5. import com.yythird.sdk.ChannelSDK;
  6. public class SDKSettings {
  7. public static String game_code; // AndroidManifest.xml中配置的游戏id
  8. public static String gcp_code;
  9. public static String order_ext;
  10. public static String imei = ""; // 手机串号
  11. public static String ifa_type = "0";
  12. public static String android_id;
  13. public static String version; // 手机当前版本号
  14. public static String versionName; // 版本号
  15. public static String sp_code;
  16. public static String device_model;
  17. public static String channelTag = "";
  18. public static String package_name = "";
  19. public static String isSimulator = "0";
  20. public static boolean isDebug = false; // debug模式配置
  21. public static String system = "android";
  22. public static String SDK_VERSION = "1.0.4";
  23. public static String LOGINTAG = Constants.LOGIN;
  24. public static boolean isThirdLogin = true; //启用第3方登录
  25. public static boolean isThirdPay = true; //启用第3方登录
  26. public static String UserCentUrl = ""; //用户中心功能
  27. public static boolean isLandscape = true; //用户中心功能
  28. public static boolean isOpenRealName = false;
  29. public static boolean isOpenFloatView = false;
  30. public static boolean isVefityRealName = true;
  31. public static boolean isForceRealName = false;
  32. public static String o_cfg = "";
  33. public static LoginData loginData = null;
  34. public static InitConfig initConfig = null;
  35. public static void initSetting(Context context) {
  36. game_code = Utils.GetApplicationMetaData(context, "yyrh_game_code");
  37. order_ext = Utils.GetApplicationMetaData(context, "yyrh_order_ext");
  38. gcp_code = Utils.getParamCnfValuebyKey(context, "YyrhParam.cnf",
  39. "GCP_CODE");
  40. channelTag = Utils.getParamCnfValuebyKey(context, "YyrhParam.cnf",
  41. "CHANNELTAG");
  42. sp_code = Utils.GetApplicationMetaData(context, "yyrh_sp_code");
  43. version = Utils.getDeviceVersion();
  44. versionName = Utils.getVersionName(context);
  45. device_model = Utils.getDeviceModel();
  46. isLandscape = Utils.isLandscape((Activity) context);
  47. LOGINTAG = Constants.LOGIN;
  48. package_name = Utils.getPackageName((Activity) context);
  49. android_id = Utils.getAndroidId(context);
  50. o_cfg = ChannelSDK.getInstance().SDKGetPkgExt(context);
  51. }
  52. }