Consts.java 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. package com.edufound.reader.util;
  2. import android.app.Application;
  3. import com.edufound.reader.bean.BaiDuUserInfo;
  4. import com.edufound.reader.bean.UserBean;
  5. import java.io.File;
  6. public class Consts {
  7. private static Application mApplicAtion;
  8. private static int[] screenSize;
  9. private static UserBean mConstsUserBean;
  10. private static BaiDuUserInfo mConstsBaiDuUserBean;
  11. private static boolean isDebug = false;
  12. private static String privService = "http://m-xyyf-web.ai160.com/res/protocol/private-kwld.htm";
  13. private static String agreementServices = "http://m-xyyf-web.ai160.com/res/protocol/service-kwld.htm";
  14. private static String FinalApiUrl = "http://reader-api.efunbox.cn";
  15. private static String UMENG_CHANNEL = null;
  16. private static String UMENG_APPKEY = null;
  17. private static String UID = "";
  18. private static String defaultUid = "test";
  19. private static boolean isYFVip = false;
  20. private static String recordUpLoadFileUrl = "";
  21. private static File mRecordSaveFile = null;
  22. private static Boolean isNeedLogin = false;
  23. //天猫
  24. private static String TMAIL_USER_ID = "-1";
  25. private static String TMAIL_DEVICE_ID = "-1";
  26. private static boolean isHaveFlowerEvent = false;
  27. private static String EVENT_TYPE_FLOWER_URL = "http://activity.ai160.com/index.html";
  28. public static int eventPosition = 0;
  29. public static boolean isIsHaveFlowerEvent() {
  30. return isHaveFlowerEvent;
  31. }
  32. public static void setIsHaveFlowerEvent(boolean isHaveFlowerEvent) {
  33. Consts.isHaveFlowerEvent = isHaveFlowerEvent;
  34. }
  35. /**
  36. * @ TODO: 获取小红花活动地址
  37. */
  38. public static String getEventTypeFlowerUrl() {
  39. return EVENT_TYPE_FLOWER_URL;
  40. }
  41. public static Boolean getIsNeedLogin() {
  42. return isNeedLogin;
  43. }
  44. public static void setIsNeedLogin(Boolean isNeedLogin) {
  45. Consts.isNeedLogin = isNeedLogin;
  46. }
  47. public static File getmRecordSaveFile() {
  48. return mRecordSaveFile;
  49. }
  50. public static void setmRecordSaveFile(File mRecordSaveFile) {
  51. Consts.mRecordSaveFile = mRecordSaveFile;
  52. }
  53. public static String getRecordUpLoadFileUrl() {
  54. return recordUpLoadFileUrl;
  55. }
  56. public static void setRecordUpLoadFileUrl(String recordUpLoadFileUrl) {
  57. Consts.recordUpLoadFileUrl = recordUpLoadFileUrl;
  58. }
  59. public static String getUID() {
  60. return UID;
  61. }
  62. public static void setUID(String UID) {
  63. Consts.UID = UID;
  64. }
  65. public static String getDefaultUid() {
  66. return defaultUid;
  67. }
  68. public static void setDefaultUid(String defaultUid) {
  69. Consts.defaultUid = defaultUid;
  70. }
  71. public static Application getmApplicAtion() {
  72. return mApplicAtion;
  73. }
  74. public static void setmApplicAtion(Application mApplicAtion) {
  75. Consts.mApplicAtion = mApplicAtion;
  76. }
  77. public static int[] getScreenSize() {
  78. return screenSize;
  79. }
  80. public static void setScreenSize(int[] screenSize) {
  81. Consts.screenSize = screenSize;
  82. }
  83. public static UserBean getmConstsUserBean() {
  84. return mConstsUserBean;
  85. }
  86. public static void setmConstsUserBean(UserBean mConstsUserBean) {
  87. Consts.mConstsUserBean = mConstsUserBean;
  88. }
  89. public static String getPrivServiceUrl() {
  90. return privService;
  91. }
  92. public static String getAgreementServicesUrl() {
  93. return agreementServices;
  94. }
  95. public static boolean isIsDebug() {
  96. return isDebug;
  97. }
  98. public static void setIsDebug(boolean isDebug) {
  99. Consts.isDebug = isDebug;
  100. if (isDebug) {
  101. //测试环境
  102. FinalApiUrl = "http://reader-api.efunbox.cn";
  103. } else {
  104. FinalApiUrl = "https://reader-xiaoai-api.ai160.com";
  105. }
  106. }
  107. public static String getFinalApi() {
  108. return FinalApiUrl;
  109. }
  110. public static String getUMengChannel() {
  111. return UMENG_CHANNEL;
  112. }
  113. public static void setUMengChannel(String umengChannel) {
  114. UMENG_CHANNEL = umengChannel;
  115. }
  116. public static String getUMengAppKey() {
  117. return UMENG_APPKEY;
  118. }
  119. public static void setUMengAppKey(String appKey) {
  120. UMENG_APPKEY = appKey;
  121. }
  122. public static BaiDuUserInfo getmConstsBaiDuUserBean() {
  123. return mConstsBaiDuUserBean;
  124. }
  125. public static void setmConstsBaiDuUserBean(BaiDuUserInfo mConstsBaiDuUserBean) {
  126. Consts.mConstsBaiDuUserBean = mConstsBaiDuUserBean;
  127. }
  128. public static boolean hasOtherEvent = false;
  129. public static boolean isHasOtherEvent() {
  130. return hasOtherEvent;
  131. }
  132. public static void setHasOtherEvent(boolean hasOtherEvent) {
  133. Consts.hasOtherEvent = hasOtherEvent;
  134. }
  135. public static boolean isIsYFVip() {
  136. return isYFVip;
  137. }
  138. public static void setIsYFVip(boolean isYFVip) {
  139. Consts.isYFVip = isYFVip;
  140. }
  141. public static String getTmailUserId() {
  142. return TMAIL_USER_ID;
  143. }
  144. public static void setTmailUserId(String tmailUserId) {
  145. TMAIL_USER_ID = tmailUserId;
  146. }
  147. public static String getTmailDeviceId() {
  148. return TMAIL_DEVICE_ID;
  149. }
  150. public static void setTmailDeviceId(String tmailDeviceId) {
  151. TMAIL_DEVICE_ID = tmailDeviceId;
  152. }
  153. public static int getEventPosition() {
  154. return eventPosition;
  155. }
  156. public static void setEventPosition(int eventPosition) {
  157. Consts.eventPosition = eventPosition;
  158. }
  159. }