| | |
| | | } |
| | | if (!dpSDKIninted) { |
| | | DPSdkConfig.Builder configBuilder = new DPSdkConfig.Builder() |
| | | .debug(true) |
| | | .debug(false) |
| | | .preloadDraw(true) |
| | | .needInitAppLog(false) |
| | | .setIsAndroidx(true) |
| | |
| | | |
| | | public static String APP_EXIT_FULL_VIDEO = "6002467567814144"; |
| | | |
| | | |
| | | } |
| | |
| | | commonPost(context, BASE_URL_V2 + "event/playDrawVideo", params, handler); |
| | | } |
| | | |
| | | public static void readNovel(Context context, long duration) { |
| | | public static void readNovel(Context context, long duration,ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | if (UserUtil.getUid(context) != null) |
| | | params.put("Uid", UserUtil.getUid(context)); |
| | | String loginUid = UserUtil.getLoginUid(context); |
| | | if (loginUid != null) { |
| | | params.put("LoginUid", loginUid); |
| | | } |
| | | params.put("Duration", duration + ""); |
| | | commonPost(context, BASE_URL_V2 + "event/readNovel", params, new BasicTextHttpResponseCallback() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | |
| | | } |
| | | }); |
| | | commonPost(context, BASE_URL + "event/readNovel", params, handler); |
| | | } |
| | | |
| | | |
| | |
| | | * @param context |
| | | * @param from |
| | | */ |
| | | public static void playDrawVideo(Context context, Map<String, Object> map, String from,boolean complete) { |
| | | HttpApiUtil.playDrawVideo(context, from,complete, new BasicTextHttpResponseHandler() { |
| | | public static void playDrawVideo(Context context, Map<String, Object> map, String from, boolean complete) { |
| | | HttpApiUtil.playDrawVideo(context, from, complete, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | |
| | |
| | | long time = NovelSDK.INSTANCE.getNovelReadingDuration(); |
| | | if (time <= 0) |
| | | return; |
| | | HttpApiUtil.readNovel(context, time); |
| | | HttpApiUtil.readNovel(context, time, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |