| | |
| | | import com.google.gson.Gson; |
| | | import com.loopj.android.http.AsyncHttpClient; |
| | | import com.loopj.android.http.SyncHttpClient; |
| | | import com.tejia.lijin.app.entity.goods.ShareCommonGoods; |
| | | import com.tejia.lijin.app.entity.user.TeamScreenInfo; |
| | | import com.tejia.lijin.app.util.DeviceInfoUtil; |
| | | import com.tejia.lijin.app.util.ToolUtil; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.user.LoginAndInviteStatusUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.DeviceUuidFactory; |
| | | import com.wpc.library.util.GetManifestDataUtil; |
| | | import com.wpc.library.util.MacUtil; |
| | |
| | | import com.wpc.library.util.common.PackageUtils2; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.util.security.MD5Utils; |
| | | import com.tejia.lijin.app.entity.goods.ShareCommonGoods; |
| | | import com.tejia.lijin.app.entity.user.TeamScreenInfo; |
| | | import com.tejia.lijin.app.util.ToolUtil; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.user.LoginAndInviteStatusUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.yeshi.push.entity.PushRomType; |
| | | |
| | | import org.apache.http.Header; |
| | |
| | | * @param context |
| | | * @param goodsId |
| | | * @param goodsType |
| | | * @param lijinId |
| | | * @param uid |
| | | * @param from |
| | | * @param handler |
| | | */ |
| | | public static void getUserLijinCreatedInfo(Context context, String goodsId, Integer goodsType, Long uid, |
| | |
| | | } |
| | | |
| | | public static void recieveHongBao(Context context, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | Long uid = UserUtil.getUid(context); |
| | | if (uid != null) |
| | |
| | | } |
| | | } |
| | | |
| | | private static String getDeviceId(Context context) { |
| | | SharedPreferences deviceInfo = context.getSharedPreferences("deviceInfo", MODE_PRIVATE); |
| | | String deviceId = deviceInfo.getString("device", ""); |
| | | if (StringUtils.isEmpty(deviceId)) { |
| | | deviceId = new DeviceUuidFactory(context).getDeviceUuid() + ""; |
| | | if (!StringUtils.isEmpty(deviceId)) { |
| | | SharedPreferences.Editor editor = deviceInfo.edit(); |
| | | editor.putString("device", deviceId); |
| | | editor.commit(); |
| | | } |
| | | } |
| | | return deviceId; |
| | | } |
| | | |
| | | private static String getUtdid(Context context) { |
| | | SharedPreferences deviceInfo = context.getSharedPreferences("deviceInfo", MODE_PRIVATE); |
| | | String utdid = deviceInfo.getString("utdid", ""); |
| | | if (StringUtils.isEmpty(utdid)) { |
| | | utdid = com.ta.utdid2.device.UTDevice.getUtdid(context); |
| | | if (!StringUtils.isEmpty(utdid)) { |
| | | SharedPreferences.Editor editor = deviceInfo.edit(); |
| | | editor.putString("utdid", utdid); |
| | | editor.commit(); |
| | | } |
| | | } |
| | | if (StringUtils.isEmpty(utdid)) |
| | | return ""; |
| | | else |
| | | return utdid; |
| | | } |
| | | |
| | | public static LinkedHashMap<String, String> validateParams( |
| | | LinkedHashMap<String, String> params, Context context) { |
| | |
| | | |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | String deviceType = DeviceInfoUtil.getSystemModel(context); |
| | | params.put("packages", API_PACKAGE_NAME); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | |
| | | params.put("apiversion", "1"); |
| | | |
| | | params.put("channel", GetManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL")); |
| | | String imei = MobileUtil.getIMEI(context); |
| | | String imei = DeviceInfoUtil.getIMEI(context); |
| | | if (!StringUtils.isEmpty(imei)) |
| | | params.put("imei", imei); |
| | | params.put("osVersion", MobileUtil.getSystemVersion()); |
| | | params.put("osVersion", DeviceInfoUtil.getSystemVersion(context)); |
| | | params.put("network", NetUtils.getNetworkState(context)); |
| | | |
| | | params.put("deviceType", StringUtils.isEmpty(deviceType) ? "" : deviceType); |
| | | params.put("time", time + ""); |
| | | params.put("Device", getDeviceId(context)); |
| | | params.put("utdid", getUtdid(context)); |
| | | params.put("Device", DeviceInfoUtil.getDeviceId(context)); |
| | | params.put("utdid", DeviceInfoUtil.getUtdid(context)); |
| | | |
| | | Iterator<String> its = params.keySet().iterator(); |
| | | List<String> list = new ArrayList<>(); |
| | |
| | | // } |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | String deviceType = DeviceInfoUtil.getSystemModel(context); |
| | | params.put("packages", API_PACKAGE_NAME); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | | params.put("apiversion", "1"); |
| | | params.put("channel", GetManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL")); |
| | | String imei = MobileUtil.getIMEI(context); |
| | | String imei = DeviceInfoUtil.getIMEI(context); |
| | | if (!StringUtils.isEmpty(imei)) { |
| | | params.put("imei", imei); |
| | | } |
| | | params.put("osVersion", MobileUtil.getSystemVersion()); |
| | | params.put("osVersion", DeviceInfoUtil.getSystemVersion(context)); |
| | | params.put("network", NetUtils.getNetworkState(context)); |
| | | params.put("deviceType", StringUtils.isEmpty(deviceType) ? "" : deviceType); |
| | | params.put("time", time + ""); |
| | | params.put("Device", getDeviceId(context)); |
| | | params.put("utdid", getUtdid(context)); |
| | | params.put("Device", DeviceInfoUtil.getDeviceId(context)); |
| | | params.put("utdid", DeviceInfoUtil.getUtdid(context)); |
| | | |
| | | |
| | | Iterator<String> its = params.keySet().iterator(); |
| | |
| | | // } |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | String deviceType = DeviceInfoUtil.getSystemModel(context); |
| | | params.put("packages", API_PACKAGE_NAME); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | | params.put("apiversion", "1"); |
| | | params.put("channel", GetManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL")); |
| | | String imei = MobileUtil.getIMEI(context); |
| | | String imei = DeviceInfoUtil.getIMEI(context); |
| | | if (!StringUtils.isEmpty(imei)) |
| | | params.put("imei", imei); |
| | | params.put("osVersion", MobileUtil.getSystemVersion()); |
| | | params.put("osVersion", DeviceInfoUtil.getSystemVersion(context)); |
| | | params.put("network", NetUtils.getNetworkState(context)); |
| | | params.put("deviceType", StringUtils.isEmpty(deviceType) ? "" : deviceType); |
| | | params.put("time", time + ""); |
| | | params.put("Device", getDeviceId(context)); |
| | | params.put("utdid", getUtdid(context)); |
| | | params.put("Device", DeviceInfoUtil.getDeviceId(context)); |
| | | params.put("utdid", DeviceInfoUtil.getUtdid(context)); |
| | | |
| | | Iterator<String> its = params.keySet().iterator(); |
| | | List<String> list = new ArrayList<>(); |