| | |
| | | import com.tejia.lijin.app.callBack.GeneralBackCallback; |
| | | import com.tejia.lijin.app.callBack.PermissionInterface; |
| | | import com.tejia.lijin.app.entity.ImgText; |
| | | import com.tejia.lijin.app.entity.JumpDetail; |
| | | import com.tejia.lijin.app.entity.share.ShareImageEntity; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转三方平台 |
| | | * |
| | | * @param args |
| | | * @throws JSONException |
| | | */ |
| | | @JavascriptInterface |
| | | public void jumpThirdPlatform(Object args) throws JSONException { |
| | | JSONObject json = new JSONObject(args.toString()); |
| | | JumpDetail jumpDetail = new JumpDetail(); |
| | | jumpDetail.setType("thirdPlatform"); |
| | | JumpActivityUtil.jumpPage(mContext, jumpDetail, com.alibaba.fastjson.JSONObject.parseObject(json.toString())); |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void hiddenTopMenuCloseBtn(Object obj) { |
| | | if (!boo) |
| | |
| | | int type = json.optInt("type"); |
| | | final String url = json.optString("url"); |
| | | |
| | | //检测权限 |
| | | String[] str = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, |
| | | Manifest.permission.WRITE_EXTERNAL_STORAGE}; |
| | | if (lacksPermissions(str)) {//缺少权限 |
| | | generalBackCallback.onSuccess(type, url); |
| | | if (mPermissionsChecker == null) |
| | | mPermissionsChecker = new PermissionHelper(mContext, this); |
| | | if (mPermissionsChecker.lacksPermissions(getPermissions())) { //存储权限未开启 |
| | | mPermissionsChecker.showNormalDialog(); |
| | | } else { |
| | | this.type = type; |
| | | this.imgurl = url; |
| | |
| | | final String urls = json.optString("urls"); |
| | | |
| | | |
| | | String[] str = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, |
| | | Manifest.permission.WRITE_EXTERNAL_STORAGE}; |
| | | if (lacksPermissions(str)) {//缺少权限 |
| | | generalBackCallback.onSuccess(type, null); |
| | | if (mPermissionsChecker == null) |
| | | mPermissionsChecker = new PermissionHelper(mContext, this); |
| | | if (mPermissionsChecker.lacksPermissions(getPermissions())) { //存储权限未开启 |
| | | mPermissionsChecker.showNormalDialog(); |
| | | } else { |
| | | List<String> urlList = new ArrayList<>(); |
| | | try { |
| | |
| | | |
| | | @JavascriptInterface |
| | | public void checkUpdate(Object obj) { |
| | | UpdateApp app = new UpdateApp(mContext,mContext.getResources().getString(R.string.update_key)); |
| | | UpdateApp app = new UpdateApp(mContext, mContext.getResources().getString(R.string.update_key)); |
| | | app.getUpdateInfo(new UpdateApp.UpdateJudgeCallback() { |
| | | |
| | | @Override |
| | |
| | | } |
| | | }, true);//强制检测更新 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | int type; |
| | |
| | | public void requestPermissionsFail() { |
| | | // Toast.makeText(this, "你以拒绝权限", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | |
| | | } |