| | |
| | | apiCenter = RetrofitUtils.getInstance().getRetrofit(CollectApiCenter.class); |
| | | } |
| | | |
| | | public void checkActive(String activeKey,LoadingHttpObserver<ActiveResult> observer){ |
| | | public void checkActive(String userId,String activeKey,LoadingHttpObserver<ActiveResult> observer){ |
| | | String ip = NetWorkUtils.getNetIp(); |
| | | String random = UUID.randomUUID().toString(); |
| | | long time = new Date().getTime()/1000; |
| | | int userId = 0; |
| | | String deviceId = DeviceIdUtils.getAndroidId(activity); |
| | | String sign = String.format("%s%s%s%s%s%s",activeKey,ip,deviceId ,random,time,userId); |
| | | |
| | | Observable<ActiveResult> observable = apiCenter.register(activeKey, ip,deviceId, random, time, userId, SHA1UTIL.MD5(SHA1UTIL.getSHA(sign))); |
| | | Observable<ActiveResult> observable = apiCenter.loginCheck(activeKey, ip,deviceId, random, time, userId, SHA1UTIL.MD5(SHA1UTIL.getSHA(sign))); |
| | | httpObserverOn(observable,observer); |
| | | } |
| | | |