Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String getUrlFromNet(String str) throws Exception {
- String text = ToolsNet.getText(String.format("http://weatherapi.market.xiaomi.com/wtr-v2/plugin/v6/checkupdate?hash=%s&device=%s&miuiVersion=%s&international=%s&alpha=%s&modDevice=%s", new Object[]{HashUtils.getSHA1(new File(str)), URLEncoder.encode(Build.DEVICE), URLEncoder.encode(VERSION.INCREMENTAL), URLEncoder.encode(String.valueOf(true)), URLEncoder.encode(String.valueOf(Build.IS_ALPHA_BUILD)), URLEncoder.encode(SystemProperties.get("ro.product.mod_device", ""))}));
- return text.contains("false") ? "false" : new JSONObject(text).getString("downloadUrl");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement