| | |
| | | import android.app.Dialog; |
| | | import android.content.Intent; |
| | | import android.content.pm.PackageManager; |
| | | import android.support.v4.content.ContextCompat; |
| | | import androidx.core.content.ContextCompat; |
| | | import android.webkit.JavascriptInterface; |
| | | import android.widget.ImageView; |
| | | import android.widget.TextView; |
| | | |
| | | import com.lcjian.library.util.common.StringUtils; |
| | | import com.tencent.smtt.sdk.WebView; |
| | | import com.weikou.beibeivideo.entity.JumpDetail; |
| | | import com.weikou.beibeivideo.ui.dialog.LoadingDialogUtil; |
| | | import com.weikou.beibeivideo.ui.login.LoginActivity; |
| | | import com.weikou.beibeivideo.ui.login.PhoneLoginActivity; |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void finishPageWithResultOK() { |
| | | mContext.runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | mContext.setResult(Activity.RESULT_OK); |
| | | mContext.finish(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 淘宝授权 |
| | | * |
| | |
| | | mContext.startActivity(intent); |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void jumpWeb() { |
| | | Intent intent = new Intent(mContext, LoginActivity.class); |
| | | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | mContext.startActivity(intent); |
| | | } |
| | | |
| | | /** |
| | | * 电话号码绑定 |
| | | */ |
| | |
| | | mContext.startActivity(intent); |
| | | } |
| | | |
| | | /** |
| | | * 跳转微信小程序 |
| | | * |
| | | * @param userName |
| | | * @param path |
| | | */ |
| | | @JavascriptInterface |
| | | public void jumpWXXCX(String userName, String path) { |
| | | JumpDetail jumpDetail = new JumpDetail(); |
| | | jumpDetail.setType("wxxcx"); |
| | | com.alibaba.fastjson.JSONObject params = new com.alibaba.fastjson.JSONObject(); |
| | | params.put("userName", userName); |
| | | params.put("path", path); |
| | | JumpActivityUtil.jumpPage(mContext, jumpDetail, params); |
| | | } |
| | | |
| | | // 判断权限集合 是否授权 false授权 true未授权 |
| | | public boolean lacksPermissions(String... permissions) { |
| | | for (String permission : permissions) { |