| | |
| | | import android.widget.TextView; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.lcjian.library.dialog.DialogUtil; |
| | | import com.lcjian.library.util.ScreenUtils; |
| | | import com.lcjian.library.util.common.BitmapUtils; |
| | | import com.lcjian.library.util.common.DrawableUtils; |
| | |
| | | import com.weikou.beibeivideo.entity.ad.AdPositionEnum; |
| | | import com.weikou.beibeivideo.entity.ad.AdTypeVO; |
| | | import com.weikou.beibeivideo.ui.ad.SplashADFragment; |
| | | import com.weikou.beibeivideo.ui.dialog.PermissionAuthNotifyDialog; |
| | | import com.weikou.beibeivideo.ui.dialog.UserProtocolDialog; |
| | | import com.weikou.beibeivideo.ui.main.MainActivity; |
| | | import com.weikou.beibeivideo.util.BeibeiConstant; |
| | |
| | | SharedPreferences preferences = getSharedPreferences("link_page", |
| | | Context.MODE_PRIVATE); |
| | | isInput = preferences.getBoolean("isInput", false); |
| | | 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) { |
| | | } |
| | | |
| | | mPermissionsChecker = new PermissionsChecker(this); |
| | | // 初始化大设备 |
| | | SDCardUtil.initStorage(this); |
| | | //初始化一次Banner,否则后面Banner使用时会出现卡顿 |
| | | // new BannerView(SplashActivity.this, ADSize.BANNER, BeibeiConstant.GDT_ID, BeibeiConstant.GDT_PLAYER_DETAIL); |
| | | //弹用户协议框 |
| | | |
| | | |
| | | showProtocol(); |
| | | |
| | | |
| | | //设置背景图片 |
| | | Drawable drawable = getResources().getDrawable(R.drawable.ic_splash_bg); |
| | | Bitmap bitmap = DrawableUtils.drawableToBitmap(drawable); |
| | |
| | | |
| | | |
| | | private void showProtocol() { |
| | | String data = "感谢您对" + getResources().getString(R.string.app_name) + "一直以来的信任!<br>"; |
| | | data += "我们依照新的监管要求条例更新了"; |
| | | String data = "尊敬的用户:<br>感谢您对" + getResources().getString(R.string.app_name) + "一直以来的信任!<br>"; |
| | | data += "我们非常尊重并保护您的个人信息、隐私。为了更好的保障您的权利,在您使用我们的产品之前,请您务必审慎阅读"; |
| | | data += String.format("<a href='%s'>《隐私政策》</a>和", BeibeiConstant.PRIVACY_POLICY); |
| | | data += String.format("<a href='%s'>《用户协议》</a>", BeibeiConstant.USER_AGREEMENT); |
| | | data += "为采取相应安全保护措施,尽力保护您的个人信息安全可控,特向你说明如下:<br>" + |
| | | "1、您在使用" + getResources().getString(R.string.app_name) + "各项产品或服务时,将会提供与具体功能相关的个人信息(可能涉及帐号、位置、存储等信息)。<br>" + |
| | | "2、您可以随时查询、更正、删除您的个人信息,我们也提供账户注销的渠道。<br>" + |
| | | "3、未经您的再次同意,我们不会将上述信息用于您未授权的其他用途或目的。<br>" + |
| | | "4、未经监护人同意,我们不会收集使用14周岁以下(含14周岁)未成年人个人信息,且不会利用其信息推送新闻、时政信息、广告等定向推送活动。"; |
| | | data += "内的所有条款,<b>尤其是:<br>" + |
| | | "1、我们对您的个人信息(包括但不限于<font color='#FF0000'>设备MAC地址、IMEI/Android ID</font>等信息)的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;<br>" + |
| | | "2、约定我们的限制责任、免责条款;<br>" + |
| | | "3、其他以加粗或斜体字进行标识的重要条款。</b><br>" + |
| | | "如您对协议有任何疑虑,可通过电子邮箱: yesbd@qq.com 向我们询问,我们将为您竭诚解答。您点击“同意并继续”的行为代表您已阅读完毕并接受以上协议全部条款。如您同意以上协议内容,请您点击“同意并继续”,开始使用您的产品。"; |
| | | |
| | | if (!UserUtil.isAgreeUserProtocol(BeibeiVideoApplication.application) && !BeibeiConstant.IS_TEST) { |
| | | Dialog dialog = new UserProtocolDialog.Builder(this).setNegativeButton("不同意", new DialogInterface.OnClickListener() { |
| | |
| | | vg_ad.post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //初始化 |
| | | BeibeiVideoApplication.init(BeibeiVideoApplication.application); |
| | | myRequetPermission(); |
| | | |
| | | new PermissionAuthNotifyDialog.Builder(SplashActivity.this).setPositiveButton(null, new DialogInterface.OnClickListener() { |
| | | @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(); |
| | | |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }).setData(data).create(); |
| | | |
| | | if (!isFinishing()) { |
| | | dialog.show(); |
| | | DialogUtil.show(dialog); |
| | | } |
| | | |
| | | } 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 |