| | |
| | | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| | | <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> |
| | | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> |
| | | <uses-permission android:name="android.permission.GET_TASKS" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> |
| | | <uses-permission android:name="android.permission.READ_LOGS" /> |
| | | <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> |
| | | <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" /> |
| | | <uses-permission android:name="com.ddysvideo.mozillaonline.permission.ACCESS_DOWNLOAD_MANAGER" /> |
| | | <uses-permission android:name="com.ddysvideo.mozillaonline.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED" /> |
| | | <uses-permission android:name="com.ddysvideo.mozillaonline.permission.SEND_DOWNLOAD_COMPLETED_INTENTS" /> |
| | | <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> |
| | | <uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" /> |
| | | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> |
| | | <uses-permission android:name="android.permission.WRITE_APN_SETTINGS" /> |
| | | |
| | | |
| | | <application |
| | |
| | | android:label="@string/app_name"></activity> |
| | | |
| | | <activity |
| | | android:name="com.weikou.beibeivideo.ui.mine.SimpleBrowserActivity" |
| | | android:configChanges="screenSize|keyboardHidden|orientation" |
| | | android:label="@string/app_name"></activity> |
| | | |
| | | <activity |
| | | android:name="com.weikou.beibeivideo.ui.mine.PPTVPlayFragment" |
| | | android:configChanges="screenSize|keyboardHidden|orientation" |
| | | android:label="@string/app_name"></activity> |
| | |
| | | implementation files('libs/FunshionBase-2.0.0.0.aar') |
| | | implementation files('libs/FunshionPlaySDK-2.0.0.2-buwanysdq.aar') |
| | | |
| | | implementation files('libs/tbs_sdk_thirdapp_v4.3.0.39_43939.jar') |
| | | implementation files('libs/tbs_sdk_thirdapp_v4.3.0.185_44085.jar') |
| | | |
| | | //阿里云手机号认证 |
| | | implementation files('libs/crashshield-2.0.0-release.aar') |
| | |
| | | |
| | | defaultConfig { |
| | | applicationId "com.doudou.ysvideo" |
| | | versionCode 118 |
| | | versionName "3.9.9" |
| | | versionCode 122 |
| | | versionName "3.10.4" |
| | | multiDexEnabled = true |
| | | minSdkVersion 17 |
| | | targetSdkVersion 29 |
| | |
| | | manifestContent = manifestContent.replaceAll("<!--[\\s\\S]*?-->", "") |
| | | manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.CAMERA" />', '') |
| | | manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.BLUETOOTH" />', '') |
| | | manifestContent = manifestContent.replace('<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />', '') |
| | | manifestContent = manifestContent.replace('<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />', '') |
| | | manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />', '') |
| | | manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REORDER_TASKS" />', '') |
| | | |
| | | println "AndroidManifest-Content:" |
| | | println manifestContent |
| | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:paddingTop="13dp" |
| | | android:orientation="vertical"> |
| | | android:orientation="vertical" |
| | | android:paddingTop="13dp"> |
| | | |
| | | <RelativeLayout style="@style/settingsItemStyle"> |
| | | |
| | |
| | | android:button="@null" /> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" /> |
| | | |
| | | <RelativeLayout style="@style/settingsItemStyle"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_alignParentStart="true" |
| | | android:layout_alignParentLeft="true" |
| | | android:gravity="center_vertical" |
| | | android:orientation="vertical" |
| | | android:paddingTop="9dp" |
| | | android:paddingBottom="9dp"> |
| | | |
| | | <TextView |
| | | style="@style/settingsItemTitleStyle" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="个性化内容推荐" /> |
| | | |
| | | <TextView |
| | | style="@style/settingsItemSubTitleStyle" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="9dp" |
| | | android:text="关闭后,内容数量将不变,但内容相关度会降低" /> |
| | | </LinearLayout> |
| | | |
| | | <CheckBox |
| | | android:id="@+id/chb_recommend_content" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_centerVertical="true" |
| | | android:background="@drawable/selector_checked" |
| | | android:button="@null" /> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" /> |
| | | |
| | | <RelativeLayout style="@style/settingsItemStyle"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_alignParentStart="true" |
| | | android:layout_alignParentLeft="true" |
| | | android:gravity="center_vertical" |
| | | android:orientation="vertical" |
| | | android:paddingTop="9dp" |
| | | android:paddingBottom="9dp"> |
| | | |
| | | <TextView |
| | | style="@style/settingsItemTitleStyle" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="个性化广告推荐" /> |
| | | |
| | | <TextView |
| | | style="@style/settingsItemSubTitleStyle" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="9dp" |
| | | |
| | | android:text="关闭后,广告数量将不变,但广告相关度会降低" /> |
| | | </LinearLayout> |
| | | |
| | | <CheckBox |
| | | android:id="@+id/chb_recommend_ad" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_centerVertical="true" |
| | | android:background="@drawable/selector_checked" |
| | | android:button="@null" /> |
| | | </RelativeLayout> |
| | | |
| | | |
| | | <RelativeLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | android:orientation="vertical"> |
| | | |
| | | <include layout="@layout/view_activity_top_navbar"></include> |
| | | |
| | | <ProgressBar |
| | | android:id="@+id/myProgressBar" |
| | | style="?android:attr/progressBarStyleHorizontal" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="3dp" |
| | | android:background="@color/nav_highloght_text_color" /> |
| | | |
| | | |
| | | <WebView |
| | | android:id="@+id/webview" |
| | | android:layout_width="fill_parent" |
| | | android:layout_height="fill_parent" /> |
| | | |
| | | </LinearLayout> |
| | |
| | | import android.view.Window; |
| | | import android.view.WindowManager; |
| | | |
| | | import com.lcjian.library.dialog.DialogUtil; |
| | | import com.lcjian.library.util.SingleToast; |
| | | import com.tencent.mm.opensdk.modelbase.BaseReq; |
| | | import com.tencent.mm.opensdk.modelbase.BaseResp; |
| | |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | DialogUtil.show(dialog); |
| | | if (!dialog.isShowing()) |
| | | dialog.show(); |
| | | } |
| | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (dialog.isShowing()) |
| | | dialog.dismiss(); |
| | | DialogUtil.dismiss(dialog); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | public static void getUid(Context context, String channel, String device, |
| | | String imei, String mac, String lat, String lng, |
| | | String imei, String lat, String lng, |
| | | ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("Method", "getUid"); |
| | | params.put("Device", device); |
| | | params.put("Imei", imei); |
| | | params.put("Mac", mac); |
| | | params.put("Lat", lat); |
| | | params.put("Lng", lng); |
| | | params.put("Channel", channel); |
| | |
| | | import android.content.Intent; |
| | | import android.content.IntentFilter; |
| | | import android.content.SharedPreferences; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | | import android.telephony.TelephonyManager; |
| | | import android.util.Log; |
| | | import android.widget.Toast; |
| | | |
| | | import com.alibaba.baichuan.android.trade.AlibcTradeSDK; |
| | | import com.alibaba.baichuan.android.trade.callback.AlibcTradeInitCallback; |
| | |
| | | |
| | | public class BeibeiVideoApplication extends Application { |
| | | |
| | | private final static String TAG = BeibeiVideoApplication.class.getName(); |
| | | private final static String TAG = BeibeiVideoApplication.class.getSimpleName(); |
| | | |
| | | public static BeibeiVideoApplication application = null; |
| | | public static String deviceName = null; |
| | |
| | | public static BeibeiVideoApplication getInstance() { |
| | | return instance; |
| | | } |
| | | |
| | | private static boolean inited = false; |
| | | |
| | | //兼容4.4以下版本 |
| | | protected void attachBaseContext(Context newBase) { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public static boolean IsInited() { |
| | | return inited; |
| | | } |
| | | |
| | | /** |
| | | * 静态初始化 |
| | | * |
| | | * @param application |
| | | */ |
| | | public static void init(final Application application) { |
| | | Log.i(TAG, "系统初始化"); |
| | | inited = true; |
| | | try { |
| | | TelephonyManager manager = (TelephonyManager) application.getSystemService(TELEPHONY_SERVICE); |
| | | Build bd = new Build(); |
| | | String model = bd.MODEL; |
| | | BeibeiVideoApplication.deviceName = model; |
| | | BeibeiVideoApplication.deviceNumber = manager.getDeviceId(); |
| | | } catch (Exception e) { |
| | | } |
| | | |
| | | //友盟初始化 |
| | | String description = ManifestDataUtil.getAppMetaData(application, "UMENG_CHANNEL"); |
| | | try { |
| | | UMConfigure.setLogEnabled(true); |
| | | UMConfigure.setLogEnabled(false); |
| | | UMConfigure.init(application, application.getResources().getString(R.string.umeng_key), description, UMConfigure.DEVICE_TYPE_PHONE, null); |
| | | MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO); |
| | | } catch (Throwable e) { |
| | | |
| | | } |
| | |
| | | |
| | | ImageLoader.getInstance().init(buildDefaultILC(application)); |
| | | initCSJAd(application); |
| | | //TODO 广点通广告初始化 |
| | | try { |
| | | GDTAdSdk.init(application, BeibeiConstant.GDT_ID); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | initWX(application); |
| | | initTaoKe(application); |
| | | |
| | | // try { |
| | | // //初始化播放插件 |
| | | // FSPlayer.init(application, FunshionConstant.APP_ID, new IAuthCodeGetter() { |
| | | // @Override |
| | | // public void getAuthCode(AuthCodeCallBack authCodeCallBack) { |
| | | // BeibeiVideoApplication.authCodeCallBack = authCodeCallBack; |
| | | // handler.sendEmptyMessage(0); |
| | | // } |
| | | // }, new FunshionPlayInitCallback() { |
| | | // |
| | | // @Override |
| | | // public void onSuccess() { |
| | | // Log.i(TAG, "风行播放器初始化成功"); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onFail(int i, String s) { |
| | | // Log.i(TAG, "风行播放器初始化失败:" + i + "-" + s); |
| | | // } |
| | | // }); |
| | | // } catch (Exception e) { |
| | | // |
| | | // } |
| | | initWX(application); |
| | | initX5(application); |
| | | //百度内容联盟 |
| | | try { |
| | | AppActivity.setActionBarColorTheme(AppActivity.ActionBarColorTheme.ACTION_BAR_WHITE_THEME); |
| | |
| | | } |
| | | |
| | | |
| | | private static void initTaoKe(Application application) { |
| | | AlibcTradeSDK.asyncInit(application, new AlibcTradeInitCallback() { |
| | | @Override |
| | | public void onSuccess() { |
| | | public static void initTaoKe(Application application, AlibcTradeInitCallback alibcTradeInitCallback) { |
| | | if (!AlibcTradeSDK.initState.isInitialized()) { |
| | | Toast.makeText(application, "初始化淘客", Toast.LENGTH_SHORT).show(); |
| | | AlibcTradeSDK.asyncInit(application, alibcTradeInitCallback); |
| | | } else { |
| | | alibcTradeInitCallback.onSuccess(); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int code, String msg) { |
| | | Log.i(TAG, "百川初始化失败:" + code + "-" + msg); |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | return config.build(); |
| | | } |
| | | |
| | | private void initX5() { |
| | | private static void initX5(Application application) { |
| | | QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() { |
| | | |
| | | @Override |
| | | public void onViewInitFinished(boolean arg0) { |
| | | // TODO Auto-generated method stub |
| | | //x5內核初始化完成的回调,为true表示x5内核加载成功,否则表示x5内核加载失败,会自动切换到系统内核。 |
| | | Log.d(TAG, " onViewInitFinished is " + arg0); |
| | | } |
| | |
| | | } |
| | | }; |
| | | //x5内核初始化接口 |
| | | QbSdk.initX5Environment(getApplicationContext(), cb); |
| | | QbSdk.initX5Environment(application, cb); |
| | | QbSdk.canGetDeviceId(false); |
| | | QbSdk.canGetAndroidId(false); |
| | | QbSdk.canGetSubscriberId(false); |
| | | } |
| | | |
| | | |
| | |
| | | import android.graphics.Color; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | |
| | | import androidx.fragment.app.FragmentActivity; |
| | | |
| | | import com.umeng.analytics.MobclickAgent; |
| | |
| | | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onResume(this); |
| | | } |
| | | |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPause(this); |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | if (name != null) |
| | | MobclickAgent.onPageStart(name); |
| | | } |
| | | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | if (name != null) |
| | | MobclickAgent.onPageEnd(name); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.weikou.beibeivideo.ui; |
| | | |
| | | import android.Manifest; |
| | | import android.app.Activity; |
| | | import android.app.AlertDialog; |
| | | import android.app.Dialog; |
| | | import android.content.Context; |
| | |
| | | |
| | | import androidx.core.app.ActivityCompat; |
| | | import androidx.core.content.ContextCompat; |
| | | import androidx.fragment.app.FragmentActivity; |
| | | |
| | | import android.telephony.TelephonyManager; |
| | | import android.view.KeyEvent; |
| | |
| | | import static android.content.pm.PackageManager.PERMISSION_DENIED; |
| | | import static android.content.pm.PackageManager.PERMISSION_GRANTED; |
| | | |
| | | public class SplashActivity extends BaseActivity { |
| | | public class SplashActivity extends FragmentActivity { |
| | | |
| | | boolean isInput = false; |
| | | |
| | |
| | | @Override |
| | | public void onClick(DialogInterface dialogInterface, int i) { |
| | | dialogInterface.dismiss(); |
| | | try { |
| | | TelephonyManager manager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); |
| | | Build bd = new Build(); |
| | | String model = bd.MODEL; |
| | | BeibeiVideoApplication.deviceName = model; |
| | | BeibeiVideoApplication.deviceNumber = manager.getDeviceId(); |
| | | } catch (Exception e) { |
| | | } |
| | | //初始化 |
| | | BeibeiVideoApplication.init(BeibeiVideoApplication.application); |
| | | myRequetPermission(); |
| | | } |
| | | }).create().show(); |
| | |
| | | } |
| | | |
| | | } else { |
| | | try { |
| | | TelephonyManager manager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); |
| | | Build bd = new Build(); |
| | | String model = bd.MODEL; |
| | | BeibeiVideoApplication.deviceName = model; |
| | | BeibeiVideoApplication.deviceNumber = manager.getDeviceId(); |
| | | } catch (Exception e) { |
| | | } |
| | | //请求权限 |
| | | vg_ad.post(new Runnable() { |
| | | @Override |
| | |
| | | |
| | | |
| | | BeibeiVideoAPI.getUid(this, channel, BeibeiVideoAPI.getDeviceId(this), preferences.getString("imei", ""), |
| | | preferences.getString("mac", ""), "", "", |
| | | "", "", |
| | | new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | |
| | | //是否需要再次请求权限 |
| | | if (sharedPreferences.getBoolean("show", true)) |
| | | ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_PHONE_STATE}, REQUEST_CODE); |
| | | else |
| | | else { |
| | | next(); |
| | | } |
| | | } else { |
| | | next(); |
| | | } |
| | |
| | | private void next() { |
| | | //百度内容联盟 |
| | | // MobadsPermissionSettings.setPermissionReadDeviceID(true); |
| | | if (!BeibeiVideoApplication.IsInited()) { |
| | | BeibeiVideoApplication.init(BeibeiVideoApplication.application); |
| | | } |
| | | getUid(); |
| | | vg_ad.postDelayed(new Runnable() { |
| | | |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("专题详情页"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("专题详情页"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("明星详情页"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("明星详情页"); |
| | | } |
| | | |
| | | private void getHotStarDetail() { |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("主界面—分类—明星"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("主界面—分类—明星"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("分类详情页"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("分类详情页"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | import com.lcjian.library.util.SystemCommon; |
| | | import com.lcjian.library.util.common.StringUtils; |
| | | import com.weikou.beibeivideo.ui.mine.SimpleBrowserActivity; |
| | | import com.weikou.beibeivideo.util.ui.TextViewUtil; |
| | | import com.weikou.beibeivideo.R; |
| | | |
| | |
| | | FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT)); |
| | | TextView tv_title = layout.findViewById(R.id.tv_title); |
| | | TextView tv_content = layout.findViewById(R.id.tv_content); |
| | | tv_content.setText(TextViewUtil.getClickableHtml(webviewData, context, Color.rgb(23,106,230))); |
| | | tv_content.setText(TextViewUtil.getClickableHtml(webviewData, context, Color.rgb(23,106,230), SimpleBrowserActivity.class)); |
| | | tv_content.setMovementMethod(LinkMovementMethod.getInstance()); |
| | | tv_content.setClickable(false); |
| | | |
| | |
| | | tv_login_onekey.setOnClickListener(this); |
| | | findViewById(R.id.tv_confirm).setOnClickListener(this); |
| | | findViewById(R.id.tv_back).setOnClickListener(this); |
| | | findViewById(R.id.tv_user_agreement).setOnClickListener(this); |
| | | findViewById(R.id.tv_privacy_policy).setOnClickListener(this); |
| | | |
| | | } |
| | | |
| | | private void initOneKeyLogin() { |
| | |
| | | .setPrivacyEnd("") |
| | | .setCheckedImgPath("ic_login_privacy_checked") |
| | | .setPrivacyTextSize(11) |
| | | .setPrivacyState(true) |
| | | .setPrivacyState(false) |
| | | .setVendorPrivacyPrefix("《") |
| | | .setVendorPrivacySuffix("》") |
| | | .create(); |
| | |
| | | case R.id.tv_back: |
| | | finish(); |
| | | break; |
| | | case R.id.tv_user_agreement: |
| | | case R.id.tv_user_agreement: { |
| | | Intent intent = new Intent(this, BrowserActivity.class); |
| | | intent.putExtra("url", BeibeiConstant.USER_AGREEMENT); |
| | | startActivity(intent); |
| | | } |
| | | break; |
| | | |
| | | case R.id.tv_privacy_policy: { |
| | | Intent intent = new Intent(this, BrowserActivity.class); |
| | | intent.putExtra("url", BeibeiConstant.PRIVACY_POLICY); |
| | | startActivity(intent); |
| | | } |
| | | break; |
| | | |
| | | case R.id.tv_obtain_verfication_code: |
| | | String phone = et_phone.getText().toString(); |
| | | if (!StringUtils.isMobileNumber(phone)) { |
| | |
| | | sendBindVerifyCode(phone); |
| | | break; |
| | | |
| | | |
| | | case R.id.tv_confirm: |
| | | if (!cb_user_agreement.isChecked()) { |
| | | SingleToast.showToast(this, "请同意《用户使用协议》"); |
| | | SingleToast.showToast(this, "请同意用户使用协议与隐私政策"); |
| | | break; |
| | | } |
| | | |
| | |
| | | switch (tokenRet.getCode()) { |
| | | case ResultCode.CODE_ERROR_ENV_CHECK_SUCCESS: |
| | | Log.i(TAG, "终端环境校验成功:" + s); |
| | | try { |
| | | mPhoneNumberAuthHelper.getLoginToken(PhoneLoginActivity.this, 5000); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case ResultCode.CODE_START_AUTHPAGE_SUCCESS: |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("主界面—分类—专题"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("主界面—分类—专题"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.umeng.socialize.media.UMImage; |
| | | import com.weikou.beibeivideo.BasicTextHttpResponseHandler; |
| | | import com.weikou.beibeivideo.BeibeiVideoAPI; |
| | | import com.weikou.beibeivideo.BeibeiVideoApplication; |
| | | import com.weikou.beibeivideo.R; |
| | | import com.weikou.beibeivideo.db.MessageTable; |
| | | import com.weikou.beibeivideo.entity.NewComment; |
| | |
| | | |
| | | import android.view.View; |
| | | import android.view.View.OnClickListener; |
| | | import android.webkit.WebChromeClient; |
| | | import android.webkit.WebViewClient; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.RelativeLayout; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.alibaba.baichuan.android.trade.AlibcTradeSDK; |
| | | import com.alibaba.baichuan.android.trade.model.AlibcShowParams; |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType; |
| | | import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.androidquery.AQuery; |
| | | import com.bumptech.glide.Glide; |
| | |
| | | import com.weikou.beibeivideo.ui.mine.SystemMessageActivity; |
| | | import com.weikou.beibeivideo.ui.mine.WatchHistoryActivity; |
| | | import com.weikou.beibeivideo.ui.recommend.SearchActivity; |
| | | import com.weikou.beibeivideo.util.AlibcTradeUtil; |
| | | import com.weikou.beibeivideo.util.BeibeiConstant; |
| | | import com.weikou.beibeivideo.util.ConfigUtil; |
| | | import com.weikou.beibeivideo.util.JumpActivityUtil; |
| | |
| | | import com.weikou.beibeivideo.widget.BadgeView; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * 原主页--我的-----3.2.4版本后已经放弃此页面 |
| | |
| | | case R.id.rl_mine_about_us: |
| | | Intent intent1 = new Intent(getContext(), BrowserActivity.class); |
| | | intent1.putExtra("url", BeibeiConstant.ABOUT_US); |
| | | // intent1.putExtra("url", "http://192.168.3.122:8848/BuWanWeb/yzhh/index.html"); |
| | | |
| | | startActivity(intent1); |
| | | |
| | | break; |
| | | |
| | | case R.id.rl_mine_buy_record: { |
| | |
| | | isHaveNewCom = preferences.getBoolean("isCheckedCom", false); |
| | | initLoginInfo(); |
| | | mChangeHelper.registerReceiver(); |
| | | MobclickAgent.onPageStart("主页面—我的"); |
| | | SharedPreferences preferences2 = tv_no_network.getContext().getSharedPreferences( |
| | | "update", Context.MODE_PRIVATE); |
| | | if (preferences2.getBoolean("status", false)) { |
| | |
| | | public void onPause() { |
| | | super.onPause(); |
| | | mChangeHelper.unregisterReceiver(); |
| | | MobclickAgent.onPageEnd("主页面—我的"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("网页"); |
| | | webview.reload(); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("网页"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | EventBus.getDefault().register(this); |
| | | MobclickAgent.onPageStart("播放详情页—小屏播放"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | EventBus.getDefault().unregister(this); |
| | | MobclickAgent.onPageEnd("播放详情页——小屏播放"); |
| | | } |
| | | |
| | | List<VideoResource> urlList; |
| | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | EventBus.getDefault().register(this); |
| | | MobclickAgent.onPageStart("播放详情—选集"); |
| | | Log.i(TAG, "onResume"); |
| | | } |
| | | |
| | |
| | | EventBus.getDefault().unregister(this); |
| | | isShowMore = false; |
| | | page_varietyshow = 0; |
| | | MobclickAgent.onPageEnd("播放详情—选集"); |
| | | Log.i(TAG, "onPause"); |
| | | } |
| | | |
| | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | EventBus.getDefault().register(this); |
| | | MobclickAgent.onPageStart("全屏播放—选集"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | EventBus.getDefault().unregister(this); |
| | | MobclickAgent.onPageEnd("全屏播放—选集"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("播放详情页或者电视剧下载页——下载"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("播放详情页或者电视剧下载页——下载"); |
| | | } |
| | | |
| | | // 提交缓存记录 |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("全屏播放——下载"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("全屏播放——下载"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("播放详情-评论"); |
| | | EventBus.getDefault().register(this); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("播放详情-评论"); |
| | | EventBus.getDefault().unregister(this); |
| | | } |
| | | |
| | |
| | | import android.app.Notification; |
| | | import android.app.NotificationChannel; |
| | | import android.app.NotificationManager; |
| | | import android.content.ClipData; |
| | | import android.content.DialogInterface; |
| | | import android.content.Intent; |
| | | import android.graphics.BitmapFactory; |
| | |
| | | import android.view.View; |
| | | import android.view.View.OnClickListener; |
| | | import android.view.ViewGroup; |
| | | import android.webkit.ValueCallback; |
| | | import android.widget.ProgressBar; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.ali.auth.third.ui.context.CallbackContext; |
| | | import com.lcjian.library.permission.PermissionHelper; |
| | | import com.lcjian.library.permission.PermissionInterface; |
| | | import com.lcjian.library.util.ManifestDataUtil; |
| | |
| | | import com.tencent.smtt.export.external.interfaces.WebResourceRequest; |
| | | import com.tencent.smtt.export.external.interfaces.WebResourceResponse; |
| | | import com.tencent.smtt.sdk.DownloadListener; |
| | | import com.tencent.smtt.sdk.QbSdk; |
| | | import com.tencent.smtt.sdk.WebChromeClient; |
| | | import com.tencent.smtt.sdk.WebSettings; |
| | | import com.tencent.smtt.sdk.WebView; |
| | | import com.tencent.smtt.sdk.WebViewClient; |
| | | import com.umeng.socialize.UMShareAPI; |
| | | import com.weikou.beibeivideo.R; |
| | | import com.weikou.beibeivideo.ui.BaseActivity; |
| | | import com.weikou.beibeivideo.ui.media.VideoDetailActivity2; |
| | |
| | | private PermissionHelper mPermissionsChecker; // 权限检测器 检测是否有储存卡写入读取权限 |
| | | |
| | | private Set<String> webSpeedUpHost; |
| | | |
| | | private ValueCallback<Uri[]> uploadMessageAboveL; |
| | | int FILE_CHOOSER_RESULT_CODE = 20001; |
| | | |
| | | private WebResourceResponse replaceLocalResource(String url) throws IOException { |
| | | if (url == null) |
| | |
| | | Log.i(TAG, consoleMessage.message()); |
| | | return super.onConsoleMessage(consoleMessage); |
| | | } |
| | | |
| | | @Override |
| | | public boolean onShowFileChooser(WebView webView, com.tencent.smtt.sdk.ValueCallback<Uri[]> valueCallback, FileChooserParams fileChooserParams) { |
| | | uploadMessageAboveL = valueCallback; |
| | | openImageChooserActivity(); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | }); |
| | | |
| | | |
| | | WebSettings webSetting = webview.getSettings(); |
| | | webSetting.setJavaScriptEnabled(true); |
| | | webSetting.setTextZoom(100); |
| | | webview.addJavascriptInterface(new BWJavaInterface(this, webview), "yestv"); |
| | | } |
| | | |
| | | |
| | | private void openImageChooserActivity() { |
| | | //调用自己的图库 |
| | | Intent i = new Intent(Intent.ACTION_GET_CONTENT); |
| | | i.addCategory(Intent.CATEGORY_OPENABLE); |
| | | i.setType("image/*"); |
| | | startActivityForResult(Intent.createChooser(i, "Image Chooser"), FILE_CHOOSER_RESULT_CODE); |
| | | } |
| | | |
| | | private boolean needSetResult = false; |
| | |
| | | super.onCreate(savedInstanceState); |
| | | getWindow().setFormat(PixelFormat.TRANSLUCENT); |
| | | setContentView(R.layout.browser_activity); |
| | | |
| | | TopStatusSettings.setStatusViewAndDeepColor(this); |
| | | tv_top_bar_left = findViewById(R.id.tv_top_bar_left); |
| | | tv_top_bar_left2 = findViewById(R.id.tv_top_bar_left2); |
| | |
| | | } |
| | | |
| | | @Override |
| | | protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
| | | CallbackContext.onActivityResult(requestCode, resultCode, data); |
| | | UMShareAPI.get(this).onActivityResult(requestCode, resultCode, data); |
| | | |
| | | if (requestCode == FILE_CHOOSER_RESULT_CODE) { //处理返回的图片,并进行上传 |
| | | if (null == uploadMessageAboveL) return; |
| | | Uri result = data == null || resultCode != RESULT_OK ? null : data.getData(); |
| | | if (uploadMessageAboveL != null) { |
| | | onActivityResultAboveL(requestCode, resultCode, data); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private void onActivityResultAboveL(int requestCode, int resultCode, Intent intent) { |
| | | if (requestCode != FILE_CHOOSER_RESULT_CODE || uploadMessageAboveL == null) |
| | | return; |
| | | Uri[] results = null; |
| | | if (resultCode == Activity.RESULT_OK) { |
| | | if (intent != null) { |
| | | String dataString = intent.getDataString(); |
| | | ClipData clipData = intent.getClipData(); |
| | | if (clipData != null) { |
| | | results = new Uri[clipData.getItemCount()]; |
| | | for (int i = 0; i < clipData.getItemCount(); i++) { |
| | | ClipData.Item item = clipData.getItemAt(i); |
| | | results[i] = item.getUri(); |
| | | } |
| | | } |
| | | if (dataString != null) |
| | | results = new Uri[]{Uri.parse(dataString)}; |
| | | } |
| | | } |
| | | uploadMessageAboveL.onReceiveValue(results); |
| | | uploadMessageAboveL = null; |
| | | } |
| | | |
| | | @Override |
| | | public void onClick(View v) { |
| | | switch (v.getId()) { |
| | | case R.id.tv_top_bar_left: { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | BeibeiVideoAPI.getUid(this, channel, new DeviceUuidFactory(this) |
| | | .getDeviceUuid().toString(), preferences.getString("imei", ""), |
| | | preferences.getString("mac", ""), preferences.getString("lat", |
| | | .getDeviceUuid().toString(), preferences.getString("imei", ""), preferences.getString("lat", |
| | | ""), preferences.getString("lng", ""), |
| | | new BasicTextHttpResponseHandler() { |
| | | @Override |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("网页"); |
| | | switch (code) { |
| | | case REQUEST_CODE_LOGIN: |
| | | UserUtil.updateUserInfo(BeibeiVideoApplication.application, null); |
| | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("网页"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | private TextView tv_top_bar_middle; |
| | | private TextView tv_version_name;// 版本号 |
| | | |
| | | private CheckBox chb_only_wifi_download; |
| | | private CheckBox chb_only_wifi_download,chb_recommend_content,chb_recommend_ad; |
| | | private RelativeLayout rl_clear_cache; |
| | | private RelativeLayout rl_about_us; |
| | | private RelativeLayout rl_check_update;// 检查更新 |
| | |
| | | tv_top_bar_left.setOnClickListener(this); |
| | | |
| | | chb_only_wifi_download = findViewById(R.id.chb_only_wifi_download); |
| | | chb_recommend_ad = findViewById(R.id.chb_recommend_ad); |
| | | chb_recommend_content = findViewById(R.id.chb_recommend_content); |
| | | rl_clear_cache = findViewById(R.id.rl_clear_cache); |
| | | rl_disclaimer = findViewById(R.id.rl_disclaimer); |
| | | rl_about_us = findViewById(R.id.rl_about_us); |
| | |
| | | .commit(); |
| | | } |
| | | }); |
| | | |
| | | chb_recommend_content.setChecked(settings.getBoolean( |
| | | "recommend_content", true)); |
| | | chb_recommend_content |
| | | .setOnCheckedChangeListener(new OnCheckedChangeListener() { |
| | | @Override |
| | | public void onCheckedChanged(CompoundButton buttonView, |
| | | boolean isChecked) { |
| | | settings.edit() |
| | | .putBoolean("recommend_content", isChecked) |
| | | .commit(); |
| | | } |
| | | }); |
| | | |
| | | chb_recommend_ad.setChecked(settings.getBoolean( |
| | | "recommend_ad", true)); |
| | | chb_recommend_ad |
| | | .setOnCheckedChangeListener(new OnCheckedChangeListener() { |
| | | @Override |
| | | public void onCheckedChanged(CompoundButton buttonView, |
| | | boolean isChecked) { |
| | | settings.edit() |
| | | .putBoolean("recommend_ad", isChecked) |
| | | .commit(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | initStorageView(); |
| | | tv_version_name.setText("版本号:" + getVersionName(this)); |
| | | // 离开按钮是否显示 |
New file |
| | |
| | | package com.weikou.beibeivideo.ui.mine; |
| | | |
| | | import android.app.Activity; |
| | | import android.graphics.PixelFormat; |
| | | import android.net.http.SslError; |
| | | import android.os.Bundle; |
| | | import android.util.Log; |
| | | import android.view.KeyEvent; |
| | | import android.view.View; |
| | | import android.view.View.OnClickListener; |
| | | import android.view.ViewGroup; |
| | | import android.webkit.SslErrorHandler; |
| | | import android.webkit.WebChromeClient; |
| | | import android.webkit.WebSettings; |
| | | import android.webkit.WebView; |
| | | import android.webkit.WebViewClient; |
| | | import android.widget.ProgressBar; |
| | | import android.widget.TextView; |
| | | |
| | | import com.weikou.beibeivideo.R; |
| | | import com.weikou.beibeivideo.util.browser.BaseBWJavaInterface; |
| | | import com.weikou.beibeivideo.util.downutil.StringUtils; |
| | | import com.weikou.beibeivideo.util.ui.TopStatusSettings; |
| | | |
| | | import androidx.fragment.app.FragmentActivity; |
| | | |
| | | public class SimpleBrowserActivity extends FragmentActivity implements OnClickListener { |
| | | private final static String TAG = "BrowserActivity"; |
| | | |
| | | private TextView tv_top_bar_left; |
| | | private TextView tv_top_bar_left2; |
| | | private TextView tv_top_bar_middle; |
| | | private WebView webview; |
| | | ProgressBar progressBar; |
| | | |
| | | |
| | | private void initX5WebView() { |
| | | webview = findViewById(R.id.webview); |
| | | webview.setWebViewClient(new WebViewClient() { |
| | | @Override |
| | | public boolean shouldOverrideUrlLoading(WebView view, String url) { |
| | | Log.i(TAG, url); |
| | | if (url != null && (!url.startsWith("http"))) { |
| | | return true; |
| | | } |
| | | return super.shouldOverrideUrlLoading(view, url); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) { |
| | | sslErrorHandler.proceed(); |
| | | } |
| | | |
| | | }); |
| | | |
| | | webview.setWebChromeClient(new WebChromeClient() { |
| | | |
| | | @Override |
| | | public void onReceivedTitle(WebView view, String title) { |
| | | tv_top_bar_middle.setText(title); |
| | | } |
| | | |
| | | @Override |
| | | public void onProgressChanged(WebView webView, int i) { |
| | | if (i == 100) { |
| | | progressBar.setVisibility(View.GONE); |
| | | } else { |
| | | if (View.INVISIBLE == progressBar.getVisibility()) { |
| | | progressBar.setVisibility(View.VISIBLE); |
| | | } |
| | | progressBar.setProgress(i); |
| | | } |
| | | super.onProgressChanged(webView, i); |
| | | } |
| | | }); |
| | | WebSettings webSetting = webview.getSettings(); |
| | | webSetting.setJavaScriptEnabled(true); |
| | | webSetting.setTextZoom(100); |
| | | webview.addJavascriptInterface(new BaseBWJavaInterface(this), "yestv"); |
| | | } |
| | | |
| | | private boolean needSetResult = false; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | getWindow().setFormat(PixelFormat.TRANSLUCENT); |
| | | setContentView(R.layout.simple_browser_activity); |
| | | TopStatusSettings.setStatusViewAndDeepColor(this); |
| | | tv_top_bar_left = findViewById(R.id.tv_top_bar_left); |
| | | tv_top_bar_left2 = findViewById(R.id.tv_top_bar_left2); |
| | | tv_top_bar_left2.setVisibility(View.VISIBLE); |
| | | tv_top_bar_middle = findViewById(R.id.tv_top_bar_middle); |
| | | |
| | | tv_top_bar_left2.setText("关闭"); |
| | | try { |
| | | if (getIntent().getBooleanExtra("close", true)) { |
| | | String close = getIntent().getStringExtra("close"); |
| | | if (!StringUtils.isNullOrEmpty(close)) { |
| | | tv_top_bar_left2.setVisibility(Boolean.parseBoolean(close) ? View.VISIBLE : View.GONE); |
| | | } else |
| | | tv_top_bar_left2.setVisibility(View.VISIBLE); |
| | | } else |
| | | tv_top_bar_left2.setVisibility(View.GONE); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | |
| | | tv_top_bar_left.setOnClickListener(this); |
| | | tv_top_bar_left2.setOnClickListener(this); |
| | | |
| | | progressBar = findViewById(R.id.myProgressBar); |
| | | progressBar.setMax(100); |
| | | progressBar.setProgressDrawable(this.getResources() |
| | | .getDrawable(R.drawable.color_progressbar)); |
| | | initX5WebView(); |
| | | String url = getIntent().getStringExtra("url"); |
| | | webview.loadUrl(url); |
| | | needSetResult = getIntent().getBooleanExtra("result", false); |
| | | } |
| | | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | if (webview != null) { |
| | | webview.loadUrl("javascript:onResume()"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | } |
| | | |
| | | @Override |
| | | protected void onDestroy() { |
| | | if (webview != null) { |
| | | webview.loadDataWithBaseURL(null, "", "text/html", "utf-8", null); |
| | | webview.clearHistory(); |
| | | |
| | | ((ViewGroup) webview.getParent()).removeView(webview); |
| | | webview.destroy(); |
| | | webview = null; |
| | | } |
| | | super.onDestroy(); |
| | | } |
| | | |
| | | @Override |
| | | public void onClick(View v) { |
| | | switch (v.getId()) { |
| | | case R.id.tv_top_bar_left: { |
| | | if (!webview.canGoBack()) |
| | | finishPage(); |
| | | else { |
| | | webview.goBack(); |
| | | } |
| | | } |
| | | break; |
| | | case R.id.tv_top_bar_left2: { |
| | | finishPage(); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void finishPage() { |
| | | if (needSetResult) |
| | | setResult(Activity.RESULT_OK); |
| | | finish(); |
| | | } |
| | | |
| | | // 设置回退 |
| | | // 覆盖Activity类的onKeyDown(int keyCoder,KeyEvent event)方法 |
| | | @Override |
| | | public boolean onKeyDown(int keyCode, KeyEvent event) { |
| | | if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) { |
| | | webview.goBack(); // goBack()表示返回WebView的上一页面 |
| | | return true; |
| | | } else { |
| | | if (keyCode == KeyEvent.KEYCODE_BACK) { |
| | | finishPage(); |
| | | } |
| | | } |
| | | return super.onKeyDown(keyCode, event); |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("电视剧多集下载"); |
| | | Cursor cursor = getActivity().getContentResolver().query( |
| | | DownloadTable.CONTENT_URI, null, |
| | | DownloadTable.VIDEO_ID + " = ? ", |
| | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("主页面——最近——缓存"); |
| | | } |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onPageStart("主页面——最近——缓存"); |
| | | if (mStatus) { |
| | | ll_storage.setVisibility(View.GONE); |
| | | } else { |
| | |
| | | super.onResume(); |
| | | if (mAdapter != null) |
| | | mAdapter.setSelectedMode(false); |
| | | MobclickAgent.onPageStart("主页面——最近——观看记录"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | MobclickAgent.onPageEnd("主页面——最近——观看记录"); |
| | | } |
| | | |
| | | |
| | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | mChangeHelper.registerReceiver(); |
| | | MobclickAgent.onPageStart("主页面—推荐"); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | mChangeHelper.unregisterReceiver(); |
| | | MobclickAgent.onPageEnd("主页面—推荐"); |
| | | } |
| | | |
| | | private String content; |
| | |
| | | |
| | | import com.alibaba.baichuan.android.trade.AlibcTrade; |
| | | import com.alibaba.baichuan.android.trade.callback.AlibcTradeCallback; |
| | | import com.alibaba.baichuan.android.trade.callback.AlibcTradeInitCallback; |
| | | import com.alibaba.baichuan.android.trade.model.AlibcShowParams; |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType; |
| | | import com.alibaba.baichuan.trade.biz.context.AlibcTradeResult; |
| | | import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams; |
| | | import com.weikou.beibeivideo.BeibeiVideoApplication; |
| | | import com.weikou.beibeivideo.ui.mine.BrowserActivity; |
| | | import com.weikou.beibeivideo.util.downutil.ApkUtil; |
| | | |
| | |
| | | * @param callback |
| | | */ |
| | | public static void openByUrl(Activity activity, String url, WebView webView, WebViewClient webViewClient, WebChromeClient webChromeClient, AlibcShowParams showParams, AlibcTaokeParams taokeParams, AlibcTradeCallback callback) { |
| | | BeibeiVideoApplication.initTaoKe(BeibeiVideoApplication.application, new AlibcTradeInitCallback() { |
| | | @Override |
| | | public void onSuccess() { |
| | | if (activity != null) { |
| | | activity.runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | openByUrl2(activity, url, webView, webViewClient, webChromeClient, showParams, taokeParams, callback); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int i, String s) { |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | private static void openByUrl2(Activity activity, String url, WebView webView, WebViewClient webViewClient, WebChromeClient webChromeClient, AlibcShowParams showParams, AlibcTaokeParams taokeParams, AlibcTradeCallback callback) { |
| | | if (showParams == null) { |
| | | showParams = new AlibcShowParams(); |
| | | } |
| | | |
| | | showParams.setOpenType(OpenType.Native); |
| | | showParams.setDegradeUrl("https://mos.m.taobao.com/activity_newer?from=pub&pid=mm_124933865_56750082_10647300249"); |
| | | // if (webView == null) |
| | |
| | | |
| | | |
| | | public static void openAuthLink(Activity activity, String authUrl) { |
| | | BeibeiVideoApplication.initTaoKe(BeibeiVideoApplication.application, new AlibcTradeInitCallback() { |
| | | @Override |
| | | public void onSuccess() { |
| | | if (activity != null) { |
| | | activity.runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | openAuthLink2(activity, authUrl); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int i, String s) { |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | private static void openAuthLink2(Activity activity, String authUrl) { |
| | | AlibcShowParams showParams = new AlibcShowParams(); |
| | | showParams.setOpenType(OpenType.Auto); |
| | | showParams.setNativeOpenFailedMode(AlibcFailModeType.AlibcNativeFailModeJumpDOWNLOAD); |
| | |
| | | } |
| | | }; |
| | | |
| | | // WebView webView=new WebView(activity); |
| | | |
| | | AlibcTrade.openByUrl(activity, "", authUrl, null, |
| | | client, null, showParams, |
| | |
| | | |
| | | public static boolean AD_CLICK_DOWNLOAD = false;//广告下载提示框是否展示 |
| | | |
| | | public static final boolean DEBUG = true; |
| | | public static final boolean DEBUG = false; |
| | | |
| | | //观看视频得影視豆 |
| | | public static GoldCornFragment.GoldCornExpireInfo watchVideoGoldCorn; |
| | |
| | | |
| | | @Override |
| | | public void fail(int i, String s) { |
| | | Log.e(TAG, "TTAdSdk初始化失败:"+s); |
| | | Log.e(TAG, "TTAdSdk初始化失败:"+i+"-"+s); |
| | | sInit = false; |
| | | } |
| | | }); |
| | |
| | | //常量 |
| | | public class Contents { |
| | | // 根目�? |
| | | public static String ROOT = "kkshow"; |
| | | public static String ROOT = "buwan"; |
| | | // 消息缓存目录 |
| | | public final static String CHATINFO = "Chat"; |
| | | // 消息图片缓存目录 |
| | |
| | | * @param context |
| | | * @return |
| | | */ |
| | | public static CharSequence getClickableHtml(String html, Context context, Integer color) { |
| | | public static CharSequence getClickableHtml(String html, Context context, Integer color,Class browserClazz) { |
| | | Spanned spannedHtml = Html.fromHtml(html); |
| | | SpannableStringBuilder clickableHtmlBuilder = new SpannableStringBuilder(spannedHtml); |
| | | URLSpan[] urls = clickableHtmlBuilder.getSpans(0, spannedHtml.length(), URLSpan.class); |
| | | for (final URLSpan span : urls) { |
| | | setLinkClickable(clickableHtmlBuilder, span, context, color); |
| | | setLinkClickable(clickableHtmlBuilder, span, context, color,browserClazz); |
| | | } |
| | | return clickableHtmlBuilder; |
| | | } |
| | |
| | | /** |
| | | * 设置点击超链接对应的处理内容 |
| | | */ |
| | | private static void setLinkClickable(final SpannableStringBuilder clickableHtmlBuilder, final URLSpan urlSpan, final Context context, final Integer linkColor) { |
| | | private static void setLinkClickable(final SpannableStringBuilder clickableHtmlBuilder, final URLSpan urlSpan, final Context context, final Integer linkColor,Class browserClazz) { |
| | | int start = clickableHtmlBuilder.getSpanStart(urlSpan); |
| | | int end = clickableHtmlBuilder.getSpanEnd(urlSpan); |
| | | int flags = clickableHtmlBuilder.getSpanFlags(urlSpan); |
| | | |
| | | ClickableSpan clickableSpan = new ClickableSpan() { |
| | | public void onClick(View view) { |
| | | context.startActivity(new Intent(context, BrowserActivity.class).putExtra("url", urlSpan.getURL())); |
| | | context.startActivity(new Intent(context,browserClazz).putExtra("url", urlSpan.getURL())); |
| | | } |
| | | |
| | | public void updateDrawState(TextPaint ds) { |
| | |
| | | url "https://maven.aliyun.com/repository/google" |
| | | } |
| | | |
| | | maven { url 'https://repo1.maven.org/maven2/' } |
| | | |
| | | jcenter() |
| | | mavenCentral() |
| | | google() |
| | |
| | | url "https://maven.aliyun.com/repository/google" |
| | | } |
| | | |
| | | maven { url 'https://repo1.maven.org/maven2/' } |
| | | |
| | | jcenter() |
| | | google() |
| | | maven { |
| | |
| | | dependencies { |
| | | api fileTree(include: '*', dir: 'libs') |
| | | |
| | | api 'com.umeng.umsdk:asms:1.2.3' //必选 |
| | | |
| | | api files('libs/umeng-common-9.4.2.jar') |
| | | api files('libs/umeng-apm-armeabi-v1.5.2.aar') |
| | | api files('libs/umeng-common-9.4.4.jar') |
| | | api files('libs/umeng-asms-armeabi-v1.4.1.aar') |
| | | |
| | | // api files('libs/core-4.1.0-openDefaultRelease.aar') |
| | | api files('libs/sina-weibo-openDefault-10.10.0.aar') |