SDKSettings.java 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 = "2.3.0";
  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 boolean isShowKf = false;
  33. public static boolean isSkipPermission = false;
  34. public static boolean isStopRequestPermisson = false;
  35. public static String o_cfg = "";
  36. public static LoginData loginData = null;
  37. public static InitConfig initConfig = null;
  38. public static void initSetting(Context context,boolean isDebug) {
  39. game_code = Utils.GetApplicationMetaData(context, "yyrh_game_code");
  40. order_ext = Utils.GetApplicationMetaData(context, "yyrh_order_ext");
  41. gcp_code = Utils.getParamCnfValuebyKey(context, "YyrhParam.cnf",
  42. "GCP_CODE");
  43. channelTag = Utils.getParamCnfValuebyKey(context, "YyrhParam.cnf",
  44. "CHANNELTAG");
  45. sp_code = Utils.GetApplicationMetaData(context, "yyrh_sp_code");
  46. version = Utils.getDeviceVersion();
  47. versionName = Utils.getVersionName(context);
  48. device_model = Utils.getDeviceModel();
  49. isLandscape = Utils.isLandscape((Activity) context);
  50. LOGINTAG = Constants.LOGIN;
  51. package_name = Utils.getPackageName((Activity) context);
  52. android_id = Utils.getAndroidId(context);
  53. o_cfg = ChannelSDK.getInstance().SDKGetPkgExt(context);
  54. channelTag = Utils.getParamCnfValuebyKey(context, "YyrhParam.cnf",
  55. "isRequestPermission");
  56. if (Utils.GetApplicationMetaData(context, "yyrh.SkipPermission").equals("true")){
  57. isSkipPermission = true;
  58. }
  59. if (Utils.GetApplicationMetaData(context, "yyrh.StopRequestPermission").equals("true")){
  60. isStopRequestPermisson = true;
  61. }
  62. SDKSettings.isDebug = isDebug;
  63. if (Utils.GetApplicationMetaData(context, "yyrh_debug").equals("true")) {
  64. SDKSettings.isDebug = true;
  65. }
  66. }
  67. }