Commit 059be960 authored by jyx's avatar jyx

添加应用外展示逻辑

parent d8ff67e0
...@@ -172,7 +172,6 @@ dependencies { ...@@ -172,7 +172,6 @@ dependencies {
// okhttp3日志 // okhttp3日志
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
implementation 'com.squareup.okhttp3:okhttp:4.9.0' implementation 'com.squareup.okhttp3:okhttp:4.9.0'
// implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.orhanobut:logger:2.2.0' implementation 'com.orhanobut:logger:2.2.0'
// 权限 // 权限
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar' implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar'
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
<uses-permission android:name="android.permission.GET_PACKAGE_SIZE" /> <uses-permission android:name="android.permission.GET_PACKAGE_SIZE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
...@@ -147,7 +150,6 @@ ...@@ -147,7 +150,6 @@
<activity android:name=".ui.activitys.SpeedTestActivity" /> <activity android:name=".ui.activitys.SpeedTestActivity" />
<activity android:name=".ui.activitys.ScanActivity" /> <activity android:name=".ui.activitys.ScanActivity" />
<activity android:name=".ui.activitys.Increasespeed2Activity" /> <activity android:name=".ui.activitys.Increasespeed2Activity" />
<activity android:name=".ui.activitys.BoostFastActivity" />
<activity android:name="com.mints.flowbox.ui.activitys.SplashGroMoreBackgroundActivity" /> <activity android:name="com.mints.flowbox.ui.activitys.SplashGroMoreBackgroundActivity" />
<activity android:name="com.mints.flowbox.ui.activitys.RedboxEraseActivity" /> <activity android:name="com.mints.flowbox.ui.activitys.RedboxEraseActivity" />
...@@ -188,7 +190,7 @@ ...@@ -188,7 +190,7 @@
android:theme="@style/CustomerTransparentTheme" /> android:theme="@style/CustomerTransparentTheme" />
<activity <activity
android:name=".ui.activitys.keepalive.TimingActivity" android:name=".ui.activitys.keepalive.TriggerActivity"
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:exported="false" android:exported="false"
android:finishOnTaskLaunch="false" android:finishOnTaskLaunch="false"
...@@ -200,10 +202,9 @@ ...@@ -200,10 +202,9 @@
android:theme="@style/CustomerTransparentTheme" /> android:theme="@style/CustomerTransparentTheme" />
<activity <activity
android:name=".ui.activitys.keepalive.AnimActivity" android:name=".ui.activitys.keepalive.BoostFastActivity"
android:theme="@style/CustomerTransparentTheme" /> android:theme="@style/CustomerTransparentTheme" />
<service <service
android:name=".service.UpdateService" android:name=".service.UpdateService"
android:exported="true" /> android:exported="true" />
......
...@@ -16,32 +16,25 @@ import com.activityutil.ActivityManagerProxy; ...@@ -16,32 +16,25 @@ import com.activityutil.ActivityManagerProxy;
import com.activityutil.ActivityManagerProxyImpl; import com.activityutil.ActivityManagerProxyImpl;
import com.ad.AdHelper; import com.ad.AdHelper;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import com.mints.flowbox.ad.express.ExpressManager;
import com.mints.flowbox.common.Constant; import com.mints.flowbox.common.Constant;
import com.mints.flowbox.keepalive.BatteryWatch; import com.mints.flowbox.keepalive.BatteryWatch;
import com.mints.flowbox.keepalive.DemoEventLogger; import com.mints.flowbox.keepalive.DemoEventLogger;
import com.mints.flowbox.keepalive.NotificationService; import com.mints.flowbox.keepalive.NotificationService;
import com.mints.flowbox.keepalive.NotificationUtil; import com.mints.flowbox.keepalive.NotificationUtil;
import com.mints.flowbox.keepalive.OutAppRouter;
import com.mints.flowbox.keepalive.PackageWatch; import com.mints.flowbox.keepalive.PackageWatch;
import com.mints.flowbox.keepalive.ServiceUtil; import com.mints.flowbox.keepalive.ServiceUtil;
import com.mints.flowbox.keepalive.ScreenWatch; import com.mints.flowbox.keepalive.ScreenWatch;
import com.mints.flowbox.keepalive.HomeKeyWatch;
import com.mints.flowbox.keepalive.WifiStateWatch; import com.mints.flowbox.keepalive.WifiStateWatch;
import com.mints.flowbox.manager.CsjGroMoreManager; import com.mints.flowbox.manager.CsjGroMoreManager;
import com.mints.flowbox.manager.MiitHelper; import com.mints.flowbox.manager.MiitHelper;
import com.mints.flowbox.manager.TrackManager;
import com.mints.flowbox.manager.ad.OwManager; import com.mints.flowbox.manager.ad.OwManager;
import com.mints.flowbox.manager.ad.TzManager; import com.mints.flowbox.manager.ad.TzManager;
import com.mints.flowbox.manager.ad.WnManager; import com.mints.flowbox.manager.ad.WnManager;
import com.mints.flowbox.manager.wifi.WifiDataManager; import com.mints.flowbox.manager.wifi.WifiDataManager;
import com.mints.flowbox.net.LoanService; import com.mints.flowbox.net.LoanService;
import com.mints.flowbox.ui.activitys.keepalive.ApkActivity; import com.mints.flowbox.ui.activitys.keepalive.TriggerActivity;
import com.mints.flowbox.ui.activitys.keepalive.BoostActivity;
import com.mints.flowbox.ui.activitys.keepalive.ScreenActivity;
import com.mints.flowbox.ui.activitys.keepalive.TimingActivity;
import com.mints.flowbox.ui.activitys.keepalive.TransparentActivity;
import com.mints.flowbox.utils.ForegroundOrBackground; import com.mints.flowbox.utils.ForegroundOrBackground;
import com.mints.flowbox.utils.keepalive.IntentUtils;
import com.mints.flowbox.utils.SystemUtils; import com.mints.flowbox.utils.SystemUtils;
import com.mints.flowbox.utils.keepalive.ScreenLockerUtils; import com.mints.flowbox.utils.keepalive.ScreenLockerUtils;
import com.module.legacy.oreo.RegisterJobUtils; import com.module.legacy.oreo.RegisterJobUtils;
...@@ -56,7 +49,6 @@ import net.DebugConfig; ...@@ -56,7 +49,6 @@ import net.DebugConfig;
import net.analytics.AnalyticsLogger; import net.analytics.AnalyticsLogger;
import net.app.BaseApp; import net.app.BaseApp;
import net.common.utils.InternalUtils; import net.common.utils.InternalUtils;
import net.phone.PhoneBrandUtils;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
...@@ -108,9 +100,6 @@ public class MintsApplication extends BaseApp { ...@@ -108,9 +100,6 @@ public class MintsApplication extends BaseApp {
// TODO 加ua字段 // TODO 加ua字段
initKeepAlive(); initKeepAlive();
// 三方配置
// thirdConfig();
} }
private void initKeepAlive() { private void initKeepAlive() {
...@@ -206,7 +195,7 @@ public class MintsApplication extends BaseApp { ...@@ -206,7 +195,7 @@ public class MintsApplication extends BaseApp {
} }
if (WifiDataManager.INSTANCE.getWifiOn()) { if (WifiDataManager.INSTANCE.getWifiOn()) {
// 跳转去wifi加速 // 跳转去wifi加速
showTimingActivity(TimingActivity.TIMING_TYPE_WIFI_BOOST); OutAppRouter.INSTANCE.showTriggerActivity(TriggerActivity.TRIGGER_TYPE_WIFI_BOOST);
} }
} }
...@@ -218,7 +207,7 @@ public class MintsApplication extends BaseApp { ...@@ -218,7 +207,7 @@ public class MintsApplication extends BaseApp {
} }
if (WifiDataManager.INSTANCE.getWifiOff()) { if (WifiDataManager.INSTANCE.getWifiOff()) {
// 跳转网络测速 // 跳转网络测速
showTimingActivity(TimingActivity.TIMING_TYPE_SPEED_TEST); OutAppRouter.INSTANCE.showTriggerActivity(TriggerActivity.TRIGGER_TYPE_WIFI_DISCONNECT_TEST);
} }
} }
}); });
...@@ -227,7 +216,6 @@ public class MintsApplication extends BaseApp { ...@@ -227,7 +216,6 @@ public class MintsApplication extends BaseApp {
ScreenWatch.getInstance(this).begin(new ScreenWatch.ScreenStateListener() { ScreenWatch.getInstance(this).begin(new ScreenWatch.ScreenStateListener() {
@Override @Override
public void onScreenOn() { public void onScreenOn() {
// showScreen();
} }
@Override @Override
...@@ -237,23 +225,13 @@ public class MintsApplication extends BaseApp { ...@@ -237,23 +225,13 @@ public class MintsApplication extends BaseApp {
return; return;
} }
if (PhoneBrandUtils.isOppo() &
!ScreenLockerUtils.INSTANCE.isOppoScreenLockOpen(MintsApplication.getContext())) {
return;
}
if (PhoneBrandUtils.isVivo() &
!ScreenLockerUtils.INSTANCE.isVivoScreenLockOpen(MintsApplication.getContext())) {
return;
}
// 检测屏幕是否亮起 // 检测屏幕是否亮起
if (!ScreenLockerUtils.INSTANCE.canShowScreenLocker(MintsApplication.getContext())) { if (!ScreenLockerUtils.INSTANCE.canShowScreenLocker(MintsApplication.getContext())) {
return; return;
} }
if (WifiDataManager.INSTANCE.getLockOn()) { if (WifiDataManager.INSTANCE.getLockOn()) {
showScreen(); OutAppRouter.INSTANCE.showScreenActivity();
} }
} }
...@@ -291,10 +269,13 @@ public class MintsApplication extends BaseApp { ...@@ -291,10 +269,13 @@ public class MintsApplication extends BaseApp {
// }); // });
// 监听电话状态 // 监听电话状态
PhoneWatch.getInstance(this).begin(new PhoneWatch.PhoneStateListener() { PhoneWatch.getInstance(this).begin(new PhoneWatch.PhoneStateListener() {
@Override @Override
public void onIdle() { public void onIdle(String phoneNum, int time) {
if (WifiDataManager.INSTANCE.getTelephoneOff()) {
OutAppRouter.INSTANCE.showTriggerActivity(TriggerActivity.TRIGGER_TYPE_PHONE, phoneNum, time);
}
} }
}); });
...@@ -306,7 +287,7 @@ public class MintsApplication extends BaseApp { ...@@ -306,7 +287,7 @@ public class MintsApplication extends BaseApp {
return; return;
} }
if (WifiDataManager.INSTANCE.getBatteryOn()) { if (WifiDataManager.INSTANCE.getBatteryOn()) {
showScreen(); OutAppRouter.INSTANCE.showScreenActivity();
} }
} }
...@@ -317,7 +298,7 @@ public class MintsApplication extends BaseApp { ...@@ -317,7 +298,7 @@ public class MintsApplication extends BaseApp {
} }
if (WifiDataManager.INSTANCE.getBatteryOff()) { if (WifiDataManager.INSTANCE.getBatteryOff()) {
// 跳转省电 // 跳转省电
showTimingActivity(TimingActivity.TIMING_TYPE_SAVE_ELE); OutAppRouter.INSTANCE.showTriggerActivity(TriggerActivity.TRIGGER_TYPE_SAVE_ELE);
} }
} }
}); });
...@@ -330,7 +311,7 @@ public class MintsApplication extends BaseApp { ...@@ -330,7 +311,7 @@ public class MintsApplication extends BaseApp {
return; return;
} }
if (WifiDataManager.INSTANCE.getInstallApk()) { if (WifiDataManager.INSTANCE.getInstallApk()) {
showApk(0, pkgName); OutAppRouter.INSTANCE.showApkActivity(0, pkgName);
} }
} }
...@@ -340,7 +321,7 @@ public class MintsApplication extends BaseApp { ...@@ -340,7 +321,7 @@ public class MintsApplication extends BaseApp {
return; return;
} }
if (WifiDataManager.INSTANCE.getUpdateApk()) { if (WifiDataManager.INSTANCE.getUpdateApk()) {
showApk(0, pkgName); OutAppRouter.INSTANCE.showApkActivity(1, pkgName);
} }
} }
...@@ -350,7 +331,7 @@ public class MintsApplication extends BaseApp { ...@@ -350,7 +331,7 @@ public class MintsApplication extends BaseApp {
return; return;
} }
if (WifiDataManager.INSTANCE.getUnInstallApk()) { if (WifiDataManager.INSTANCE.getUnInstallApk()) {
showApk(2, pkgName); OutAppRouter.INSTANCE.showApkActivity(2, pkgName);
} }
} }
}); });
...@@ -360,62 +341,6 @@ public class MintsApplication extends BaseApp { ...@@ -360,62 +341,6 @@ public class MintsApplication extends BaseApp {
KeepAliveHelper.Companion.postInit(this); KeepAliveHelper.Companion.postInit(this);
} }
/**
* 展示定时页面
*/
private void showTimingActivity(int currentType) {
// 预加载信息流
ExpressManager.INSTANCE.loadAppOutExpress();
Intent intent = new Intent(MintsApplication.getContext(), TimingActivity.class);
intent.putExtra(TimingActivity.TIMING_TYPE, currentType);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent);
}
/**
* 展示apk管理页面
*
* @param state 0:安装 1:更新 2:卸载
* @param pkgName 包名
*/
private void showApk(int state, String pkgName) {
// 应用在前台,则不展示
if (ForegroundOrBackground.isForeground2() || state == 1) {
return;
}
Intent intent = new Intent(MintsApplication.getContext(), ApkActivity.class);
intent.putExtra(ApkActivity.APK_STATE, state);
intent.putExtra(ApkActivity.APK_PKG_NAME, pkgName);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent);
}
/**
* 展示加速页面
*/
private void showBoost() {
// 预加载信息流
ExpressManager.INSTANCE.loadAppOutExpress();
Intent intent = new Intent(MintsApplication.getContext(), BoostActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent);
}
/**
* 展示锁屏页面
*/
private void showScreen() {
// 预加载信息流
ExpressManager.INSTANCE.loadAppOutExpress();
Intent intent = new Intent(MintsApplication.getContext(), ScreenActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent);
}
private void androidPWebView() { private void androidPWebView() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
String processName = getProcessName(this); String processName = getProcessName(this);
...@@ -440,9 +365,6 @@ public class MintsApplication extends BaseApp { ...@@ -440,9 +365,6 @@ public class MintsApplication extends BaseApp {
System.out.println("mints ------------> MainProgress <------------"); System.out.println("mints ------------> MainProgress <------------");
// TODO 喜马拉雅初始化须放在最前面,否则听不到声音,暂时注掉
// XmManager.INSTANCE.init(this);
// 天卓珊瑚 // 天卓珊瑚
TzManager.INSTANCE.initTz(this); TzManager.INSTANCE.initTz(this);
......
...@@ -60,9 +60,23 @@ class DeviceInfo private constructor() { ...@@ -60,9 +60,23 @@ class DeviceInfo private constructor() {
*/ */
val newModel: String val newModel: String
get() { get() {
return brand + " " + mobileModel + return "$brand $mobileModel"
" " + totalMemory + "+" + totalStorage + }
" " + operator
/**
* 设备内存信息
*/
val mem: String
get() {
return "$totalMemory+$totalStorage"
}
/**
* 型号
*/
val newOperator: String
get() {
return operator
} }
/** /**
......
...@@ -5,11 +5,10 @@ import android.os.Message; ...@@ -5,11 +5,10 @@ import android.os.Message;
import com.bytedance.msdk.adapter.util.WeakHandler; import com.bytedance.msdk.adapter.util.WeakHandler;
import com.mints.flowbox.MintsApplication; import com.mints.flowbox.MintsApplication;
import com.mints.flowbox.ad.express.ExpressManager;
import com.mints.flowbox.common.AppConfig; import com.mints.flowbox.common.AppConfig;
import com.mints.flowbox.manager.TrackManager; import com.mints.flowbox.manager.TrackManager;
import com.mints.flowbox.manager.wifi.WifiDataManager; import com.mints.flowbox.manager.wifi.WifiDataManager;
import com.mints.flowbox.ui.activitys.keepalive.TimingActivity; import com.mints.flowbox.ui.activitys.keepalive.TransparentActivity;
import com.mints.flowbox.utils.ForegroundOrBackground; import com.mints.flowbox.utils.ForegroundOrBackground;
import com.mints.flowbox.utils.keepalive.IntentUtils; import com.mints.flowbox.utils.keepalive.IntentUtils;
...@@ -129,17 +128,12 @@ public class AlarmManager implements WeakHandler.IHandler { ...@@ -129,17 +128,12 @@ public class AlarmManager implements WeakHandler.IHandler {
* 展示定时页面 * 展示定时页面
*/ */
private void showTimingActivity() { private void showTimingActivity() {
if (currentType > 5) {
// 预加载信息流
ExpressManager.INSTANCE.loadAppOutExpress();
currentType++;
if (currentType > 2) {
currentType = 0; currentType = 0;
} }
Intent intent = new Intent(MintsApplication.getContext(), TimingActivity.class); Intent intent = new Intent(MintsApplication.getContext(), TransparentActivity.class);
intent.putExtra(TimingActivity.TIMING_TYPE, currentType); intent.putExtra(TransparentActivity.TIMING_TYPE, currentType++);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent); IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent);
} }
......
package com.mints.flowbox.keepalive
import android.R.attr.phoneNumber
import android.app.Activity
import android.content.Intent
import android.net.Uri
import com.mints.flowbox.MintsApplication
import com.mints.flowbox.ad.express.ExpressManager
import com.mints.flowbox.ui.activitys.keepalive.ApkActivity
import com.mints.flowbox.ui.activitys.keepalive.BoostActivity
import com.mints.flowbox.ui.activitys.keepalive.ScreenActivity
import com.mints.flowbox.ui.activitys.keepalive.TriggerActivity
import com.mints.flowbox.utils.ForegroundOrBackground
import com.mints.flowbox.utils.keepalive.IntentUtils
import net.phone.PhoneBrandUtils
/**
*
* @author jyx
* @date 2021/7/15
* @des 应用外 Activity 跳转路由
*/
object OutAppRouter {
/**
* 展示apk管理页面
*
* @param state 0:安装 1:更新 2:卸载
* @param pkgName 包名
*/
fun showApkActivity(state: Int, pkgName: String) {
// 预加载信息流
ExpressManager.loadAppOutExpress()
// 应用在前台,则不展示
if (ForegroundOrBackground.isForeground2()) {
return
}
val intent = Intent(MintsApplication.getContext(), ApkActivity::class.java)
intent.putExtra(ApkActivity.APK_STATE, state)
intent.putExtra(ApkActivity.APK_PKG_NAME, pkgName)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_NO_ANIMATION
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent)
}
/**
* 展示锁屏页面
*/
fun showScreenActivity() {
// 预加载信息流
ExpressManager.loadAppOutExpress()
val intent = Intent(MintsApplication.getContext(), ScreenActivity::class.java)
if (!PhoneBrandUtils.isOppo()) {
intent.flags = Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT
}
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_NO_ANIMATION
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent)
}
/**
* 跳转拨号
*/
fun goToCall(activity: Activity, phone: String?) {
val intent = Intent(Intent.ACTION_DIAL, Uri.parse("tel:${phone}"))
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
ForegroundOrBackground.getMain_activity().startActivity(intent);
}
/**
* 跳转短信
*/
fun goToSms(activity: Activity, phone: String?) {
val uri = Uri.parse("smsto:${phone}")
val intent = Intent(Intent.ACTION_SENDTO, uri)
ForegroundOrBackground.getMain_activity().startActivity(intent);
}
/**
* 展示加速页面
*/
fun showBoostActivity() {
// 预加载信息流
ExpressManager.loadAppOutExpress()
val intent = Intent(MintsApplication.getContext(), BoostActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_NO_ANIMATION
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent)
}
/**
* 展示弹出页面
*/
fun showTriggerActivity(currentType: Int, phone: String, time: Int) {
// 预加载信息流
ExpressManager.loadAppOutExpress()
val intent = Intent(MintsApplication.getContext(), TriggerActivity::class.java)
intent.putExtra(TriggerActivity.TRIGGER_TYPE, currentType)
intent.putExtra(TriggerActivity.CALL_PHONE_TIME, time)
intent.putExtra(TriggerActivity.CALL_PHONE_NUM, phone)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent)
}
/**
* 展示弹出页面
*/
fun showTriggerActivity(currentType: Int) {
// 预加载信息流
ExpressManager.loadAppOutExpress()
var realType = currentType
// wifi 连接时轮询展示弹窗
if (currentType == TriggerActivity.TRIGGER_TYPE_WIFI_BOOST) {
realType = getWifiConnectType()
}
// wifi 未连接时轮询展示弹窗
if (currentType == TriggerActivity.TRIGGER_TYPE_WIFI_DISCONNECT_TEST) {
realType = getWifiDisconnectType()
}
val intent = Intent(MintsApplication.getContext(), TriggerActivity::class.java)
intent.putExtra(TriggerActivity.TRIGGER_TYPE, realType)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent)
}
private var mWifiConnectType = TriggerActivity.TRIGGER_TYPE_WIFI_BOOST - 1
private var mWifiDisconnectType = TriggerActivity.TRIGGER_TYPE_WIFI_DISCONNECT_TEST - 1
private fun getWifiConnectType(): Int {
if (mWifiConnectType > TriggerActivity.TRIGGER_TYPE_WIFI_SAFE) {
mWifiConnectType = TriggerActivity.TRIGGER_TYPE_WIFI_BOOST - 1
}
return mWifiConnectType++
}
private fun getWifiDisconnectType(): Int {
if (mWifiDisconnectType > TriggerActivity.TRIGGER_TYPE_WIFI_DISCONNECT_BOOST) {
mWifiDisconnectType = TriggerActivity.TRIGGER_TYPE_WIFI_DISCONNECT_TEST - 1
}
return mWifiDisconnectType++
}
}
\ No newline at end of file
...@@ -6,6 +6,11 @@ import android.content.Intent; ...@@ -6,6 +6,11 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import com.mints.flowbox.utils.LogUtil;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/** /**
* @author jyx * @author jyx
* @date 2021/6/18 * @date 2021/6/18
...@@ -20,6 +25,7 @@ public class PhoneWatch { ...@@ -20,6 +25,7 @@ public class PhoneWatch {
private PhoneWatch(Context context) { private PhoneWatch(Context context) {
mContext = context; mContext = context;
mPhoneReceiver = new PhoneBroadcastReceiver(); mPhoneReceiver = new PhoneBroadcastReceiver();
// mPhoneReceiver = new PhoneBroadcastReceiver(mContext);
} }
private static PhoneWatch instance; private static PhoneWatch instance;
...@@ -33,6 +39,23 @@ public class PhoneWatch { ...@@ -33,6 +39,23 @@ public class PhoneWatch {
* Phone状态广播接收者 * Phone状态广播接收者
*/ */
private class PhoneBroadcastReceiver extends BroadcastReceiver { private class PhoneBroadcastReceiver extends BroadcastReceiver {
// //获取本次通话的时间(单位:秒)
// int time = 0;
// //判断是否正在通话
// boolean isCalling;
// //控制循环是否结束
// boolean isFinish;
//
// private ExecutorService service;
// public PhoneBroadcastReceiver(Context context) {
// this.context = context;
// service = Executors.newSingleThreadExecutor();
// }
long time = 0;
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
//判断是否为手机行为状态 //判断是否为手机行为状态
...@@ -43,16 +66,50 @@ public class PhoneWatch { ...@@ -43,16 +66,50 @@ public class PhoneWatch {
//获取电话号码 //获取电话号码
String phone = intent.getStringExtra("incoming_number"); String phone = intent.getStringExtra("incoming_number");
switch (state) { switch (state) {
case TelephonyManager.CALL_STATE_RINGING: case TelephonyManager.CALL_STATE_RINGING: // 来电
// Log.i("PhoneWatch", phone + "来电"); LogUtil.d("AAA -> CALL_STATE_RINGING");
// isFinish = false;
// if (service.isShutdown()) {
// service = Executors.newSingleThreadExecutor();
// }
break; break;
case TelephonyManager.CALL_STATE_OFFHOOK: case TelephonyManager.CALL_STATE_OFFHOOK: // 正在通话中
// Log.i("PhoneWatch", phone + "正在通话中"); LogUtil.d("AAA -> CALL_STATE_OFFHOOK");
time = System.currentTimeMillis();
// isCalling = true;
// service.execute(() -> {
// while (!isFinish) {
// try {
// Thread.sleep(1000);
// time++;
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// }
// });
break; break;
case TelephonyManager.CALL_STATE_IDLE: case TelephonyManager.CALL_STATE_IDLE: // 通话结束
// Log.i("PhoneWatch", phone + "通话结束了"); LogUtil.d("AAA -> CALL_STATE_IDLE");
if (mPhoneStateListener != null) mPhoneStateListener.onIdle();
time = System.currentTimeMillis() - time;
if (time != 0) {
time /= 1000;
}
if (mPhoneStateListener != null)
mPhoneStateListener.onIdle(phone, (int) time);
// if (isCalling) {
// isCalling = false;
// isFinish = true;
// service.shutdown();
// if (mPhoneStateListener != null)
// mPhoneStateListener.onIdle(phone, time);
// time = 0;
// }
break; break;
} }
} }
...@@ -89,7 +146,7 @@ public class PhoneWatch { ...@@ -89,7 +146,7 @@ public class PhoneWatch {
// //
// void onOffHook(); // void onOffHook();
void onIdle(); void onIdle(String phoneNum, int time);
} }
} }
...@@ -30,9 +30,7 @@ object TzManager { ...@@ -30,9 +30,7 @@ object TzManager {
"CHANNEL_NAME" "CHANNEL_NAME"
) )
) )
.forTest(true) .forTest(false)
.log(true)
.verbose(true)
.build() .build()
) )
} }
......
package com.mints.flowbox.manager.wifi package com.mints.flowbox.manager.wifi
import android.text.format.DateUtils import android.text.format.DateUtils
import com.hjq.toast.ToastUtils
import com.mints.flowbox.keepalive.AlarmManager import com.mints.flowbox.keepalive.AlarmManager
import com.mints.flowbox.manager.AppPreferencesManager import com.mints.flowbox.manager.AppPreferencesManager
import com.mints.flowbox.manager.TrackManager
import com.mints.flowbox.mvp.model.OutAppConfig import com.mints.flowbox.mvp.model.OutAppConfig
import com.mints.flowbox.utils.LogUtil
import com.mints.flowbox.utils.ToastUtil
/** /**
* wifi本地数据管理 * wifi本地数据管理
...@@ -146,7 +144,7 @@ object WifiDataManager { ...@@ -146,7 +144,7 @@ object WifiDataManager {
*/ */
fun getBatteryOn(): Boolean { fun getBatteryOn(): Boolean {
// 总开关关闭 return // 总开关关闭 return
if (!APP_OUT_MAIN_SWITCH or BATTERY_ON_OPEN) return false if (!APP_OUT_MAIN_SWITCH or !BATTERY_ON_OPEN) return false
val batteryOn = sp.getInt(BATTERY_ON, 0) val batteryOn = sp.getInt(BATTERY_ON, 0)
if (batteryOn < BATTERY_ON_TIMES) { if (batteryOn < BATTERY_ON_TIMES) {
...@@ -162,7 +160,7 @@ object WifiDataManager { ...@@ -162,7 +160,7 @@ object WifiDataManager {
*/ */
fun getBatteryOff(): Boolean { fun getBatteryOff(): Boolean {
// 总开关关闭 return // 总开关关闭 return
if (!APP_OUT_MAIN_SWITCH or BATTERY_OFF_OPEN) return false if (!APP_OUT_MAIN_SWITCH or !BATTERY_OFF_OPEN) return false
val batteryOff = sp.getInt(BATTERY_OFF, 0) val batteryOff = sp.getInt(BATTERY_OFF, 0)
if (batteryOff < BATTERY_OFF_TIMES) { if (batteryOff < BATTERY_OFF_TIMES) {
...@@ -178,7 +176,7 @@ object WifiDataManager { ...@@ -178,7 +176,7 @@ object WifiDataManager {
*/ */
fun getLockOn(): Boolean { fun getLockOn(): Boolean {
// 总开关关闭 return // 总开关关闭 return
if (!APP_OUT_MAIN_SWITCH or LOCK_OPEN) return false if (!APP_OUT_MAIN_SWITCH or !LOCK_OPEN) return false
val lockOn = sp.getInt(LOCK_ON, 0) val lockOn = sp.getInt(LOCK_ON, 0)
if (lockOn < LOCK_TIMES) { if (lockOn < LOCK_TIMES) {
...@@ -340,14 +338,15 @@ object WifiDataManager { ...@@ -340,14 +338,15 @@ object WifiDataManager {
// 第二天,新的一天 // 第二天,新的一天
sp.put(NEW_DAY_FLAG, time) sp.put(NEW_DAY_FLAG, time)
resetData(data) TrackManager.getInstance().getOuterAdConfig()
// resetData(data)
return false return false
} }
/** /**
* 重置次数 * 重置次数
*/ */
public fun resetData(data: OutAppConfig) { fun resetData(data: OutAppConfig) {
if (!data.isOpen) { if (!data.isOpen) {
APP_OUT_MAIN_SWITCH = false APP_OUT_MAIN_SWITCH = false
return return
......
...@@ -14,6 +14,16 @@ public class OutAppConfig implements Serializable { ...@@ -14,6 +14,16 @@ public class OutAppConfig implements Serializable {
*/ */
private boolean open; private boolean open;
public Long getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
private Long time;
/** /**
* screen_open : {"remark":"解锁","intervalMins":10,"maxCount":10,"open":true} * screen_open : {"remark":"解锁","intervalMins":10,"maxCount":10,"open":true}
* charge : {"remark":"充电","maxCount":10,"open":true} * charge : {"remark":"充电","maxCount":10,"open":true}
......
...@@ -85,6 +85,8 @@ public class AwardPresenter extends BasePresenter<AwardView> { ...@@ -85,6 +85,8 @@ public class AwardPresenter extends BasePresenter<AwardView> {
vo.put("os", "android"); vo.put("os", "android");
vo.put("shumeiId", ShumeiManager.getInstance().getShumeiDeviceId()); vo.put("shumeiId", ShumeiManager.getInstance().getShumeiDeviceId());
vo.put("model", deviceInfo.getNewModel()); vo.put("model", deviceInfo.getNewModel());
vo.put("mem", deviceInfo.getMem());
vo.put("operator", deviceInfo.getNewOperator());
vo.put("uuid", new DeviceUuidFactory().getDeviceUuid()); vo.put("uuid", new DeviceUuidFactory().getDeviceUuid());
vo.put("osversion", deviceInfo.getOSVersion()); vo.put("osversion", deviceInfo.getOSVersion());
vo.put("appversion", deviceInfo.getVersionName()); vo.put("appversion", deviceInfo.getVersionName());
......
...@@ -140,6 +140,8 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> { ...@@ -140,6 +140,8 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
vo.put("os", "android"); vo.put("os", "android");
vo.put("shumeiId", ShumeiManager.getInstance().getShumeiDeviceId()); vo.put("shumeiId", ShumeiManager.getInstance().getShumeiDeviceId());
vo.put("model", deviceInfo.getNewModel()); vo.put("model", deviceInfo.getNewModel());
vo.put("mem", deviceInfo.getMem());
vo.put("operator", deviceInfo.getNewOperator());
vo.put("uuid", new DeviceUuidFactory().getDeviceUuid()); vo.put("uuid", new DeviceUuidFactory().getDeviceUuid());
vo.put("osversion", deviceInfo.getOSVersion()); vo.put("osversion", deviceInfo.getOSVersion());
vo.put("appversion", deviceInfo.getVersionName()); vo.put("appversion", deviceInfo.getVersionName());
......
...@@ -2,11 +2,11 @@ package com.mints.flowbox.mvp.presenters ...@@ -2,11 +2,11 @@ package com.mints.flowbox.mvp.presenters
import com.google.gson.JsonObject import com.google.gson.JsonObject
import com.mints.flowbox.MintsApplication import com.mints.flowbox.MintsApplication
import com.mints.flowbox.ad.code.CsjCode
import com.mints.flowbox.ad.code.YlhCode
import com.mints.flowbox.common.DeviceInfo import com.mints.flowbox.common.DeviceInfo
import com.mints.flowbox.manager.AppHttpManager import com.mints.flowbox.manager.AppHttpManager
import com.mints.flowbox.mvp.model.* import com.mints.flowbox.mvp.model.BannerBean
import com.mints.flowbox.mvp.model.BaseResponse
import com.mints.flowbox.mvp.model.CodeBean
import com.mints.flowbox.mvp.views.HomeView import com.mints.flowbox.mvp.views.HomeView
import com.mints.flowbox.utils.DeviceUuidFactory import com.mints.flowbox.utils.DeviceUuidFactory
import com.mints.library.net.neterror.BaseSubscriber import com.mints.library.net.neterror.BaseSubscriber
...@@ -85,6 +85,8 @@ class HomePresenter : BasePresenter<HomeView>() { ...@@ -85,6 +85,8 @@ class HomePresenter : BasePresenter<HomeView>() {
vo["oaid"] = MintsApplication.OAID vo["oaid"] = MintsApplication.OAID
vo["os"] = "android" vo["os"] = "android"
vo["model"] = deviceInfo.newModel vo["model"] = deviceInfo.newModel
vo["mem"] = deviceInfo.mem
vo["operator"] = deviceInfo.newOperator
vo["uuid"] = DeviceUuidFactory().deviceUuid vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName vo["appversion"] = deviceInfo.versionName
......
...@@ -3,6 +3,7 @@ package com.mints.flowbox.mvp.presenters ...@@ -3,6 +3,7 @@ package com.mints.flowbox.mvp.presenters
import android.text.TextUtils import android.text.TextUtils
import com.mints.flowbox.MintsApplication import com.mints.flowbox.MintsApplication
import com.mints.flowbox.common.DeviceInfo import com.mints.flowbox.common.DeviceInfo
import com.mints.flowbox.manager.*
import com.mints.flowbox.mvp.model.BaseResponse import com.mints.flowbox.mvp.model.BaseResponse
import com.mints.flowbox.mvp.model.UserBean import com.mints.flowbox.mvp.model.UserBean
import com.mints.flowbox.mvp.views.LoginView import com.mints.flowbox.mvp.views.LoginView
...@@ -11,7 +12,6 @@ import com.mints.flowbox.utils.rxutil.CommonRxTask ...@@ -11,7 +12,6 @@ import com.mints.flowbox.utils.rxutil.CommonRxTask
import com.mints.flowbox.utils.rxutil.RxjavaUtil import com.mints.flowbox.utils.rxutil.RxjavaUtil
import com.mints.library.net.neterror.BaseSubscriber import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable import com.mints.library.net.neterror.Throwable
import com.mints.flowbox.manager.*
import java.util.* import java.util.*
class LoginPresenter : BasePresenter<LoginView>() { class LoginPresenter : BasePresenter<LoginView>() {
...@@ -241,6 +241,8 @@ class LoginPresenter : BasePresenter<LoginView>() { ...@@ -241,6 +241,8 @@ class LoginPresenter : BasePresenter<LoginView>() {
} }
vo["os"] = "android" vo["os"] = "android"
vo["model"] = deviceInfo.newModel vo["model"] = deviceInfo.newModel
vo["mem"] = deviceInfo.mem
vo["operator"] = deviceInfo.newOperator
vo["uuid"] = DeviceUuidFactory().deviceUuid vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName vo["appversion"] = deviceInfo.versionName
......
...@@ -16,7 +16,7 @@ import com.mints.flowbox.utils.DeviceUuidFactory ...@@ -16,7 +16,7 @@ import com.mints.flowbox.utils.DeviceUuidFactory
import com.mints.flowbox.utils.IPUtil import com.mints.flowbox.utils.IPUtil
import com.mints.library.net.neterror.BaseSubscriber import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable import com.mints.library.net.neterror.Throwable
import java.util.HashMap import java.util.*
class MainPresenter : BasePresenter<MainView>() { class MainPresenter : BasePresenter<MainView>() {
/** /**
...@@ -68,6 +68,8 @@ class MainPresenter : BasePresenter<MainView>() { ...@@ -68,6 +68,8 @@ class MainPresenter : BasePresenter<MainView>() {
} }
vo["os"] = "android" vo["os"] = "android"
vo["model"] = deviceInfo.newModel vo["model"] = deviceInfo.newModel
vo["mem"] = deviceInfo.mem
vo["operator"] = deviceInfo.newOperator
vo["uuid"] = DeviceUuidFactory().deviceUuid vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName vo["appversion"] = deviceInfo.versionName
......
...@@ -2,7 +2,6 @@ package com.mints.flowbox.mvp.presenters; ...@@ -2,7 +2,6 @@ package com.mints.flowbox.mvp.presenters;
import android.app.Activity; import android.app.Activity;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.format.DateUtils;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.mints.flowbox.MintsApplication; import com.mints.flowbox.MintsApplication;
...@@ -33,7 +32,6 @@ import rx.android.schedulers.AndroidSchedulers; ...@@ -33,7 +32,6 @@ import rx.android.schedulers.AndroidSchedulers;
public class TrackPresenter extends BaseTrackPresenter { public class TrackPresenter extends BaseTrackPresenter {
public void cmtGroMoreInfo(HashMap<String, Object> vo) { public void cmtGroMoreInfo(HashMap<String, Object> vo) {
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.reportAdIncome(vo), .call(loanService.reportAdIncome(vo),
......
...@@ -70,7 +70,6 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener { ...@@ -70,7 +70,6 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
window.addFlags( window.addFlags(
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
or WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
or WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
or WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON or WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
) )
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
......
...@@ -324,7 +324,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -324,7 +324,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
private var mRefreshType = -1 private var mRefreshType = -1
private var powerDialog: PowerDialog? = null private var powerDialog: PowerDialog? = null
private var userMsgBean: UserTaskMsgBean? = null private var userMsgBean: UserTaskMsgBean? = null
...@@ -373,6 +372,16 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -373,6 +372,16 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
// 数美初始化 // 数美初始化
ShumeiManager.getInstance().initShumei() ShumeiManager.getInstance().initShumei()
// 预加载信息流
ExpressManager.loadExpress(false)
val bundle = Bundle()
bundle.putString(
IncreasespeedActivity.INCREASE_TYPE,
IncreasespeedActivity.INCREASE_BOOST
)
readyGo(IncreasespeedActivity::class.java)
} }
} }
} }
......
...@@ -2,7 +2,11 @@ package com.mints.flowbox.ui.activitys ...@@ -2,7 +2,11 @@ package com.mints.flowbox.ui.activitys
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Dialog import android.app.Dialog
import android.content.Intent
import android.graphics.ImageFormat import android.graphics.ImageFormat
import android.os.Handler
import android.os.Looper
import android.provider.Settings
import android.text.TextUtils import android.text.TextUtils
import android.util.Size import android.util.Size
import android.view.Surface import android.view.Surface
...@@ -214,6 +218,22 @@ class ScanActivity : BaseActivity(), View.OnClickListener { ...@@ -214,6 +218,22 @@ class ScanActivity : BaseActivity(), View.OnClickListener {
object : DialogListener() { object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) { override fun onClick(dialog: Dialog?, v: View?) {
super.onClick(dialog, v) super.onClick(dialog, v)
Handler(Looper.getMainLooper()).postDelayed({
if (TextUtils.equals(
ssid,
WifiUtils.getInstance(this@ScanActivity).connectionWifiInfo.ssid
)
) {
ToastUtils.show("连接成功...")
finish()
} else {
ToastUtils.show("连接失败...")
startActivity(Intent(Settings.ACTION_WIFI_SETTINGS))
}
}, 3000)
ToastUtils.show("正在连接中...") ToastUtils.show("正在连接中...")
WifiUtils.getInstance(this@ScanActivity).connectWifiPws(ssid, psw) WifiUtils.getInstance(this@ScanActivity).connectWifiPws(ssid, psw)
dialog?.dismiss() dialog?.dismiss()
......
package com.mints.flowbox.ui.activitys; package com.mints.flowbox.ui.activitys;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import com.bytedance.msdk.adapter.pangle.PangleNetworkRequestInfo; import com.bytedance.msdk.adapter.pangle.PangleNetworkRequestInfo;
import com.bytedance.msdk.api.AdError; import com.bytedance.msdk.api.AdError;
...@@ -13,8 +16,11 @@ import com.bytedance.msdk.api.TTNetworkRequestInfo; ...@@ -13,8 +16,11 @@ import com.bytedance.msdk.api.TTNetworkRequestInfo;
import com.bytedance.msdk.api.splash.TTSplashAd; import com.bytedance.msdk.api.splash.TTSplashAd;
import com.bytedance.msdk.api.splash.TTSplashAdListener; import com.bytedance.msdk.api.splash.TTSplashAdListener;
import com.bytedance.msdk.api.splash.TTSplashAdLoadCallback; import com.bytedance.msdk.api.splash.TTSplashAdLoadCallback;
import com.daimajia.androidanimations.library.Techniques;
import com.daimajia.androidanimations.library.YoYo;
import com.mints.flowbox.MintsApplication; import com.mints.flowbox.MintsApplication;
import com.mints.flowbox.R; import com.mints.flowbox.R;
import com.mints.flowbox.ad.express.ExpressManager;
import com.mints.flowbox.common.Constant; import com.mints.flowbox.common.Constant;
import com.mints.flowbox.common.DeviceInfo; import com.mints.flowbox.common.DeviceInfo;
import com.mints.flowbox.manager.CsjGroMoreManager; import com.mints.flowbox.manager.CsjGroMoreManager;
...@@ -22,6 +28,7 @@ import com.mints.flowbox.manager.TrackManager; ...@@ -22,6 +28,7 @@ import com.mints.flowbox.manager.TrackManager;
import com.mints.flowbox.manager.TtCsjAdManager; import com.mints.flowbox.manager.TtCsjAdManager;
import com.mints.flowbox.manager.UserManager; import com.mints.flowbox.manager.UserManager;
import com.mints.flowbox.ui.activitys.base.BaseActivity; import com.mints.flowbox.ui.activitys.base.BaseActivity;
import com.mints.flowbox.ui.widgets.CycleProgress;
import com.mints.flowbox.utils.LogUtil; import com.mints.flowbox.utils.LogUtil;
import com.mints.library.utils.CommonUtils; import com.mints.library.utils.CommonUtils;
...@@ -39,7 +46,7 @@ public class SplashGroMoreActivity extends BaseActivity { ...@@ -39,7 +46,7 @@ public class SplashGroMoreActivity extends BaseActivity {
private boolean mForceGoMain; private boolean mForceGoMain;
//开屏广告加载超时时间,建议大于1000,这里为了冷启动第一次加载到广告并且展示,示例设置了2000ms //开屏广告加载超时时间,建议大于1000,这里为了冷启动第一次加载到广告并且展示,示例设置了2000ms
private static final int AD_TIME_OUT = 4000; private static final int AD_TIME_OUT = 5000;
private static final int MSG_GO_MAIN = 1; private static final int MSG_GO_MAIN = 1;
//开屏广告是否已经加载 //开屏广告是否已经加载
private boolean mHasLoaded; private boolean mHasLoaded;
...@@ -50,6 +57,11 @@ public class SplashGroMoreActivity extends BaseActivity { ...@@ -50,6 +57,11 @@ public class SplashGroMoreActivity extends BaseActivity {
private boolean baiduSplashAdClicked = false; private boolean baiduSplashAdClicked = false;
private boolean onPaused = false; private boolean onPaused = false;
private CycleProgress mProgressBar;
private RelativeLayout mPreContainer;
private Handler mMainHandler;
@Override @Override
protected int getContentViewLayoutID() { protected int getContentViewLayoutID() {
return R.layout.activity_splash_gromore; return R.layout.activity_splash_gromore;
...@@ -66,6 +78,15 @@ public class SplashGroMoreActivity extends BaseActivity { ...@@ -66,6 +78,15 @@ public class SplashGroMoreActivity extends BaseActivity {
TrackManager.getInstance().getCommonHallBaseMsg(); TrackManager.getInstance().getCommonHallBaseMsg();
TrackManager.getInstance().firstApiWithUid(); TrackManager.getInstance().firstApiWithUid();
// 预加载弹窗信息流
ExpressManager.INSTANCE.loadExpress(true);
mMainHandler = new Handler(Looper.getMainLooper());
mProgressBar = findViewById(R.id.progressBar);
mPreContainer = findViewById(R.id.preContainer);
mProgressBar.startAnim();
// 校验APP签名 // 校验APP签名
checkAppSign(); checkAppSign();
} }
...@@ -97,48 +118,63 @@ public class SplashGroMoreActivity extends BaseActivity { ...@@ -97,48 +118,63 @@ public class SplashGroMoreActivity extends BaseActivity {
//百度兜底 //百度兜底
// ttNetworkRequestInfo = new BaiduNetworkRequestInfo("e866cfb0", "2058622"); // ttNetworkRequestInfo = new BaiduNetworkRequestInfo("e866cfb0", "2058622");
//step4:请求广告,调用开屏广告异步请求接口,对请求回调的广告作渲染处理 //step4:请求广告,调用开屏广告异步请求接口,对请求回调的广告作渲染处理
mTTSplashAd.loadAd(adSlot, ttNetworkRequestInfo, new TTSplashAdLoadCallback() { mTTSplashAd.loadAd(adSlot, ttNetworkRequestInfo, new TTSplashAdLoadCallback() {
// mTTSplashAd.loadAd(adSlot, new TTSplashAdLoadCallback() { // mTTSplashAd.loadAd(adSlot, new TTSplashAdLoadCallback() {
@Override @Override
public void onSplashAdLoadFail(AdError adError) { public void onSplashAdLoadFail(AdError adError) {
LogUtil.d(TAG, adError.message); mProgressBar.setComplete();
mHasLoaded = true;
LogUtil.d(TAG, "load splash ad error : " + adError.code + ", " + adError.message);
// 获取本次waterfall加载中,加载失败的adn错误信息。
if (mTTSplashAd != null)
LogUtil.d(TAG, "ad load infos: " + mTTSplashAd.getAdLoadInfoList());
goToMainActivity();
}
@Override mMainHandler.postDelayed(() -> {
public void onSplashAdLoadSuccess() { LogUtil.d(TAG, adError.message);
if (mTTSplashAd != null) { mHasLoaded = true;
mTTSplashAd.showAd(mSplashContainer); LogUtil.d(TAG, "load splash ad error : " + adError.code + ", " + adError.message);
isBaiduSplashAd = mTTSplashAd.getAdNetworkPlatformId() == NetworkPlatformConst.SDK_NAME_BAIDU;
// 获取本次waterfall加载中,加载失败的adn错误信息。 // 获取本次waterfall加载中,加载失败的adn错误信息。
if (mTTSplashAd != null)
LogUtil.d(TAG, "ad load infos: " + mTTSplashAd.getAdLoadInfoList());
goToMainActivity();
}, 500);
}
HashMap<String, Object> vo = new HashMap<>(); @Override
vo.put("adcode", mTTSplashAd.getAdNetworkRitId()); public void onSplashAdLoadSuccess() {
vo.put("ecpm", mTTSplashAd.getPreEcpm()); mProgressBar.setComplete();
vo.put("adSource", mTTSplashAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE0); mMainHandler.postDelayed(() -> {
vo.put("adid", CsjGroMoreManager.INSTANCE.getAPP_IN_MAIN_AD_UNIT_SPLASH_ID());
TrackManager.getInstance().cmtGroMoreInfo(vo); if (mTTSplashAd != null) {
} YoYo.with(Techniques.FadeOut).duration(500).playOn(mPreContainer);
LogUtil.d(TAG, "load splash ad success ");
mTTSplashAd.showAd(mSplashContainer);
isBaiduSplashAd = mTTSplashAd.getAdNetworkPlatformId() == NetworkPlatformConst.SDK_NAME_BAIDU;
// 获取本次waterfall加载中,加载失败的adn错误信息。
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mTTSplashAd.getAdNetworkRitId());
vo.put("ecpm", mTTSplashAd.getPreEcpm());
vo.put("adSource", mTTSplashAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE0);
vo.put("adid", CsjGroMoreManager.INSTANCE.getAPP_IN_MAIN_AD_UNIT_SPLASH_ID());
TrackManager.getInstance().cmtGroMoreInfo(vo);
}
LogUtil.d(TAG, "load splash ad success ");
}, 500);
} }
@Override @Override
public void onAdLoadTimeout() { public void onAdLoadTimeout() {
mHasLoaded = true; mProgressBar.setComplete();
Log.i(TAG, "开屏广告加载超时.......");
// 获取本次waterfall加载中,加载失败的adn错误信息。 mMainHandler.postDelayed(() -> {
if (mTTSplashAd != null) mHasLoaded = true;
LogUtil.d(TAG, "ad load infos: " + mTTSplashAd.getAdLoadInfoList()); Log.i(TAG, "开屏广告加载超时.......");
goToMainActivity(); // 获取本次waterfall加载中,加载失败的adn错误信息。
if (mTTSplashAd != null)
LogUtil.d(TAG, "ad load infos: " + mTTSplashAd.getAdLoadInfoList());
goToMainActivity();
}, 500);
} }
}, AD_TIME_OUT); }, AD_TIME_OUT);
......
package com.mints.flowbox.ui.activitys.base package com.mints.flowbox.ui.activitys.base
import android.Manifest
import android.app.WallpaperManager
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.view.WindowManager import android.view.WindowManager
import androidx.core.app.ActivityCompat
import com.mints.flowbox.R
import com.mints.flowbox.utils.keepalive.ScreenLockerUtils import com.mints.flowbox.utils.keepalive.ScreenLockerUtils
import com.mints.library.base.BaseSwipeBackCompatActivity import com.mints.library.base.BaseSwipeBackCompatActivity
import com.mints.library.net.netstatus.NetUtils import com.mints.library.net.netstatus.NetUtils
import net.phone.PhoneBrandUtils
/** /**
* 应用外Activity * 应用外Activity
...@@ -13,31 +21,59 @@ import com.mints.library.net.netstatus.NetUtils ...@@ -13,31 +21,59 @@ import com.mints.library.net.netstatus.NetUtils
abstract class OutAppActivity : BaseSwipeBackCompatActivity() { abstract class OutAppActivity : BaseSwipeBackCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
// 设置可以显示在锁屏页面之上 if (Build.VERSION.SDK_INT >= 28) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
setShowWhenLocked(true) setShowWhenLocked(true)
// 强制亮屏
// setTurnScreenOn(true)
// val keyguardManager = getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager
// keyguardManager.requestDismissKeyguard(this, null)
} else { } else {
this.window.addFlags( window.addFlags(524288)
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
)
} }
// 设置锁屏页全屏 window.addFlags(4194304)
ScreenLockerUtils.updateWindowFlags(this.window.decorView) if (Build.VERSION.SDK_INT >= 21) {
ScreenLockerUtils.makeLockWindowFullScreen(this, this.window.attributes, false) window.decorView.systemUiVisibility = 1792
}
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
window.setWindowAnimations(R.style.AppTheme_LockScreen_Animation)
val layoutParams = window.attributes
window.attributes = layoutParams
window.statusBarColor = Color.TRANSPARENT
window.navigationBarColor = Color.TRANSPARENT
resetWindowTransparentBackground()
// 设置锁屏页全屏
val isUsingShowWhenLockedFlag = !ScreenLockerUtils.isLockScreenProtected(this)
if (isUsingShowWhenLockedFlag) {
ScreenLockerUtils.updateWindowFlags(window.decorView)
} else {
ScreenLockerUtils.makeLockWindowFullScreen(
this,
this.window.attributes,
isUsingShowWhenLockedFlag
)
}
}
private fun resetWindowTransparentBackground() {
window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER)
// 华为手机且没有存储权限 设置透明背景
if (PhoneBrandUtils.isHuaweiManufactured() && ActivityCompat.checkSelfPermission(
this,
Manifest.permission.WRITE_EXTERNAL_STORAGE
) != 0
) {
window.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
} else {
val wallpaperManager = WallpaperManager.getInstance(this)
val wallpaperDrawable: Drawable = wallpaperManager.drawable
window.setBackgroundDrawable(wallpaperDrawable)
}
} }
override fun onNetworkConnected(type: NetUtils.NetType?) {} override fun onNetworkConnected(type: NetUtils.NetType?) {}
override fun onNetworkDisConnected() {} override fun onNetworkDisConnected() {}
override fun isApplyStatusBarTranslucency() = false override fun isApplyStatusBarTranslucency() = true
override fun toggleOverridePendingTransition() = false override fun toggleOverridePendingTransition() = false
......
package com.mints.flowbox.ui.activitys.keepalive
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.View
import com.mints.flowbox.R
import com.mints.flowbox.ad.wifi.WifiAdManager
import com.mints.flowbox.ui.activitys.base.BaseActivity
import kotlinx.android.synthetic.main.activity_anim.*
/**
*
* 描述:应用外加速
*/
class AnimActivity : BaseActivity() {
override fun getBundleExtras(extras: Bundle?) {
super.getBundleExtras(extras)
}
override fun getContentViewLayoutID() = R.layout.activity_anim
override fun initViewsAndEvents() {
ccav_speed.startAnimation()
Handler(Looper.getMainLooper()).postDelayed(
{
ccav_speed.stopAnimation()
ccav_speed.visibility = View.GONE
WifiAdManager.instance.showInterstitial(this)
},
2000
)
}
override fun onDestroy() {
WifiAdManager.instance.onDestroy()
super.onDestroy()
}
override fun isApplyKitKatTranslucency() = true
}
\ No newline at end of file
...@@ -9,7 +9,6 @@ import com.daimajia.androidanimations.library.YoYo ...@@ -9,7 +9,6 @@ import com.daimajia.androidanimations.library.YoYo
import com.mints.flowbox.R import com.mints.flowbox.R
import com.mints.flowbox.ad.express.ExpressManager import com.mints.flowbox.ad.express.ExpressManager
import com.mints.flowbox.common.Constant import com.mints.flowbox.common.Constant
import com.mints.flowbox.keepalive.AlarmManager
import com.mints.flowbox.ui.activitys.CleanActivity import com.mints.flowbox.ui.activitys.CleanActivity
import com.mints.flowbox.ui.activitys.base.BaseActivity import com.mints.flowbox.ui.activitys.base.BaseActivity
import com.mints.flowbox.utils.AppUtil import com.mints.flowbox.utils.AppUtil
...@@ -18,6 +17,7 @@ import com.mints.library.utils.GlideUtils ...@@ -18,6 +17,7 @@ import com.mints.library.utils.GlideUtils
import kotlinx.android.synthetic.main.activity_apk.* import kotlinx.android.synthetic.main.activity_apk.*
import kotlinx.android.synthetic.main.activity_apk.btnClean import kotlinx.android.synthetic.main.activity_apk.btnClean
import kotlinx.android.synthetic.main.activity_apk.fl_ad import kotlinx.android.synthetic.main.activity_apk.fl_ad
import kotlinx.android.synthetic.main.activity_apk.iv_close
import kotlinx.android.synthetic.main.activity_apk.tvInfo import kotlinx.android.synthetic.main.activity_apk.tvInfo
import kotlin.random.Random import kotlin.random.Random
...@@ -51,6 +51,8 @@ class ApkActivity : BaseActivity() { ...@@ -51,6 +51,8 @@ class ApkActivity : BaseActivity() {
} }
private fun initView() { private fun initView() {
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_clean, ivImg)
if (mApkState == 0) { if (mApkState == 0) {
// 应用安装 // 应用安装
val apkInfo2 = AppUtil.getApkInfo2(this, mApkPkgName) val apkInfo2 = AppUtil.getApkInfo2(this, mApkPkgName)
...@@ -100,18 +102,13 @@ class ApkActivity : BaseActivity() { ...@@ -100,18 +102,13 @@ class ApkActivity : BaseActivity() {
override fun isApplyKitKatTranslucency() = true override fun isApplyKitKatTranslucency() = true
override fun finish() {
super.finish()
AlarmManager.getInstance().resetUserActionTime()
}
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
initExpress() initExpress()
btnClean.postDelayed({ btnClean.postDelayed({
rope = YoYo.with(Techniques.Pulse).duration(1000).repeat(10).playOn(btnClean) rope = YoYo.with(Techniques.Pulse).duration(500).repeat(10).playOn(btnClean)
}, 200) }, 200)
} }
......
package com.mints.flowbox.ui.activitys.keepalive
import android.animation.Animator
import android.animation.ArgbEvaluator
import android.animation.ObjectAnimator
import android.animation.ValueAnimator
import android.annotation.SuppressLint
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.View
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.mints.flowbox.R
import com.mints.flowbox.ad.express.ExpressManager
import com.mints.flowbox.ad.wifi.WifiAdManager
import com.mints.flowbox.ui.activitys.base.BaseActivity
import kotlinx.android.synthetic.main.activity_boost_fast.*
import kotlinx.android.synthetic.main.activity_boost_fast.iv_close
import kotlin.random.Random
/**
*
* 描述:加速动画页
*/
@SuppressLint("SetTextI18n")
class BoostFastActivity : BaseActivity() {
companion object {
private const val RED = 0xffFF8080
private const val BLUE = 0xff8080FF
private const val CYAN = 0xff80ffff
private const val GREEN = 0xff80ff80
}
private var mType = 0
override fun getBundleExtras(extras: Bundle?) {
super.getBundleExtras(extras)
extras?.let {
mType = it.getInt(TransparentActivity.TIMING_TYPE, 0)
}
}
override fun getContentViewLayoutID() = R.layout.activity_boost_fast
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
initView()
startAnim()
}
private fun startAnim() {
val colorAnim = ObjectAnimator.ofInt(
container,
"backgroundColor",
RED.toInt(),
BLUE.toInt(),
CYAN.toInt(),
GREEN.toInt()
)
colorAnim.duration = 3000
colorAnim.setEvaluator(ArgbEvaluator())
colorAnim.repeatMode = ValueAnimator.REVERSE
when (mType) {
TransparentActivity.TIMING_TYPE_BOOST -> ccav_speed.setCenterImageView(R.mipmap.ic_app_out_timing_boost)
TransparentActivity.TIMING_TYPE_CLEAN -> ccav_speed.setCenterImageView(R.mipmap.ic_app_out_timing_clean)
TransparentActivity.TIMING_TYPE_SAVE_ELE -> ccav_speed.setCenterImageView(R.mipmap.ic_app_out_timing_save_ele)
TransparentActivity.TIMING_TYPE_COOL -> ccav_speed.setCenterImageView(R.mipmap.ic_app_out_timing_cool)
TransparentActivity.TIMING_TYPE_SAFE -> ccav_speed.setCenterImageView(R.mipmap.ic_app_out_timing_safe)
TransparentActivity.TIMING_TYPE_PRICARY -> ccav_speed.setCenterImageView(R.mipmap.ic_app_out_timing_pricary)
}
ccav_speed.startAnimation()
colorAnim.start()
Handler(Looper.getMainLooper()).postDelayed(
{
YoYo.with(Techniques.FadeOut).duration(500).playOn(container)
YoYo.with(Techniques.FadeOut).duration(500).playOn(ccav_speed)
WifiAdManager.instance.showInterstitial(this)
},
2500
)
Handler(Looper.getMainLooper()).postDelayed(
{
ccav_speed.stopAnimation()
ccav_speed.visibility = View.GONE
container.visibility = View.GONE
adContainer.visibility = View.VISIBLE
when (mType) {
TransparentActivity.TIMING_TYPE_BOOST -> tvContent.text = "手机速度已达最佳"
TransparentActivity.TIMING_TYPE_CLEAN -> {
tvContent.text = "已为您清理" + (10 + Random.nextInt(20)) + "MB垃圾" + "\n垃圾清理已完成"
}
TransparentActivity.TIMING_TYPE_SAVE_ELE -> {
tvContent.text = "已为您延长待机时间" + (10 + Random.nextInt(20)) + "分钟~"
}
TransparentActivity.TIMING_TYPE_COOL -> {
tvContent.text = "手机已降温" + (3 + Random.nextInt(3)) + "°C"
}
TransparentActivity.TIMING_TYPE_SAFE -> tvContent.text = "当前网络环境良好"
TransparentActivity.TIMING_TYPE_PRICARY -> tvContent.text = "当前使用环境安全"
}
}, 3000
)
colorAnim.addListener(object : Animator.AnimatorListener {
override fun onAnimationStart(animation: Animator?) {}
override fun onAnimationEnd(animation: Animator?) {
}
override fun onAnimationCancel(animation: Animator?) {}
override fun onAnimationRepeat(animation: Animator?) {}
})
}
private fun initView() {
iv_close.setOnClickListener {
finish()
overridePendingTransition(0, 0)
}
}
override fun onResume() {
super.onResume()
initExpress()
}
/**
* 初始化信息iyc
*/
private fun initExpress() {
try {
if (fl_ad != null) {
fl_ad.removeAllViews()
fl_ad.addView(ExpressManager.getAppOutExpressFrameLayout())
}
} catch (e: Exception) {
e.printStackTrace()
}
}
override fun onBackPressed() {
// super.onBackPressed()
}
}
package com.mints.flowbox.ui.activitys.keepalive package com.mints.flowbox.ui.activitys.keepalive
import android.app.WallpaperManager
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.os.Bundle import android.os.Bundle
import android.os.Handler import android.os.Handler
import android.os.Looper import android.os.Looper
...@@ -15,7 +12,6 @@ import com.mints.flowbox.ui.activitys.IncreasespeedActivity ...@@ -15,7 +12,6 @@ import com.mints.flowbox.ui.activitys.IncreasespeedActivity
import com.mints.flowbox.ui.activitys.base.OutAppActivity import com.mints.flowbox.ui.activitys.base.OutAppActivity
import com.mints.flowbox.utils.TimeRender import com.mints.flowbox.utils.TimeRender
import com.mints.flowbox.utils.ToolUtil import com.mints.flowbox.utils.ToolUtil
import com.mints.flowbox.utils.keepalive.ScreenLockerUtils
import com.mints.library.utils.nodoubleclick.AntiShake import com.mints.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_screen.* import kotlinx.android.synthetic.main.activity_screen.*
import java.util.* import java.util.*
...@@ -23,15 +19,6 @@ import java.util.* ...@@ -23,15 +19,6 @@ import java.util.*
class ScreenActivity : OutAppActivity(), View.OnClickListener { class ScreenActivity : OutAppActivity(), View.OnClickListener {
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
try {
val wallpaperManager = WallpaperManager.getInstance(this)
val wallpaperDrawable: Drawable = wallpaperManager.drawable
container.background = wallpaperDrawable
} catch (e: java.lang.Exception) {
e.printStackTrace()
container.setBackgroundColor(Color.BLACK)
}
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
mHelper.swipeBackLayout.setEdgeSize(ToolUtil.getScreenWidth(this)) mHelper.swipeBackLayout.setEdgeSize(ToolUtil.getScreenWidth(this))
mHelper.swipeBackLayout.setTopEdgeSize( mHelper.swipeBackLayout.setTopEdgeSize(
......
package com.mints.flowbox.ui.activitys.keepalive package com.mints.flowbox.ui.activitys.keepalive
import android.content.Intent import android.content.Intent
import android.os.Bundle
import android.view.Gravity
import com.mints.flowbox.MintsApplication import com.mints.flowbox.MintsApplication
import com.mints.flowbox.R import com.mints.flowbox.R
import com.mints.flowbox.ad.express.ExpressManager
import com.mints.flowbox.ad.wifi.WifiAdManager import com.mints.flowbox.ad.wifi.WifiAdManager
import com.mints.flowbox.ad.wifi.WifiAdStatusListener import com.mints.flowbox.ad.wifi.WifiAdStatusListener
import com.mints.flowbox.ui.activitys.base.BaseActivity import com.mints.flowbox.ui.activitys.base.BaseActivity
import com.mints.flowbox.utils.LogUtil
/** /**
* *
...@@ -14,18 +16,25 @@ import com.mints.flowbox.utils.LogUtil ...@@ -14,18 +16,25 @@ import com.mints.flowbox.utils.LogUtil
*/ */
class TransparentActivity : BaseActivity() { class TransparentActivity : BaseActivity() {
// override fun onCreate(savedInstanceState: Bundle?) { companion object {
// val window = window const val TIMING_TYPE = "TIMING_TYPE"
// window.setGravity(Gravity.START or Gravity.TOP)
// val params = window.attributes const val TIMING_TYPE_BOOST = 0 // 加速
// params.x = 0 const val TIMING_TYPE_CLEAN = 1 // 清理
// params.y = 0 const val TIMING_TYPE_SAVE_ELE = 2 // 省电
// params.height = 1 const val TIMING_TYPE_COOL = 3 // 降温
// params.width = 1 const val TIMING_TYPE_SAFE = 4 // 安全检测
// window.attributes = params const val TIMING_TYPE_PRICARY = 5 // 安全检测
// }
// super.onCreate(savedInstanceState)
// } private var mType = 0
override fun getBundleExtras(extras: Bundle?) {
super.getBundleExtras(extras)
extras?.let {
mType = it.getInt(TIMING_TYPE, 0)
}
}
override fun getContentViewLayoutID() = R.layout.activity_trans override fun getContentViewLayoutID() = R.layout.activity_trans
...@@ -39,17 +48,21 @@ class TransparentActivity : BaseActivity() { ...@@ -39,17 +48,21 @@ class TransparentActivity : BaseActivity() {
* 加载广告 * 加载广告
*/ */
private fun loadAd() { private fun loadAd() {
LogUtil.d("TransparentActivity -> loadAd")
WifiAdManager.instance.setWifiAdStatusListener(object : WifiAdStatusListener { WifiAdManager.instance.setWifiAdStatusListener(object : WifiAdStatusListener {
override fun adSuccess() { override fun adSuccess() {
val intent = Intent(MintsApplication.getContext(), AnimActivity::class.java) // 预加载信息流
ExpressManager.loadAppOutExpress()
val intent = Intent(MintsApplication.getContext(), BoostFastActivity::class.java)
intent.putExtra(TIMING_TYPE, mType)
startActivity(intent) startActivity(intent)
finish() finish()
overridePendingTransition(0, 0) overridePendingTransition(0, 0)
} }
override fun adFail() { override fun adFail() {
finish()
overridePendingTransition(0, 0)
WifiAdManager.instance.onDestroy() WifiAdManager.instance.onDestroy()
finish() finish()
overridePendingTransition(0, 0) overridePendingTransition(0, 0)
...@@ -61,5 +74,16 @@ class TransparentActivity : BaseActivity() { ...@@ -61,5 +74,16 @@ class TransparentActivity : BaseActivity() {
WifiAdManager.instance.loadWifiAd(this) WifiAdManager.instance.loadWifiAd(this)
} }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val window = window
window.setGravity(Gravity.START or Gravity.TOP)
val params = window.attributes
params.x = 0
params.y = 0
params.height = 1
params.width = 1
window.attributes = params
}
} }
\ No newline at end of file
package com.mints.flowbox.ui.activitys.keepalive
import android.os.Bundle
import android.view.View
import androidx.core.content.ContextCompat
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.mints.flowbox.R
import com.mints.flowbox.ad.express.ExpressManager
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.keepalive.AlarmManager
import com.mints.flowbox.keepalive.OutAppRouter
import com.mints.flowbox.ui.activitys.Increasespeed2Activity
import com.mints.flowbox.ui.activitys.IncreasespeedActivity
import com.mints.flowbox.ui.activitys.SpeedFastActivity
import com.mints.flowbox.ui.activitys.SpeedTestActivity
import com.mints.flowbox.ui.activitys.base.BaseActivity
import com.mints.flowbox.utils.SpanUtils
import com.mints.flowbox.utils.SystemUtils
import com.mints.library.utils.GlideUtils
import kotlinx.android.synthetic.main.activity_timing.*
import kotlinx.android.synthetic.main.activity_timing.fl_ad
import kotlinx.android.synthetic.main.activity_timing.iv_close
import kotlin.random.Random
/**
*
* 描述:检测到具体操作弹出的activity
*/
class TriggerActivity : BaseActivity() {
companion object {
const val TRIGGER_TYPE = "TIMING_TYPE"
const val CALL_PHONE_TIME = "CALL_PHONE_TIME"
const val CALL_PHONE_NUM = "CALL_PHONE_NUM"
// 随机 wifi连接
const val TRIGGER_TYPE_WIFI_BOOST = 0 // wifi提速
const val TRIGGER_TYPE_WIFI_TEST = 1 // wifi测试
const val TRIGGER_TYPE_WIFI_SAFE = 2 // wifi安全
const val TRIGGER_TYPE_WIFI_DISCONNECT_TEST = 3 // wifi断开时测速
const val TRIGGER_TYPE_WIFI_DISCONNECT_BOOST = 4 // wifi断开时加速
const val TRIGGER_TYPE_BOOST = 5 // 加速
const val TRIGGER_TYPE_SAVE_ELE = 6 // 省电
const val TRIGGER_TYPE_PHONE = 7 // 电话挂断
}
/**
* 0-加速 1-清理 2-省电
* 3-wifi加速 4-网络测速
*
*/
private var mType = 0
private var mPhoneTime = 0
private var mPhone = ""
private var rope: YoYo.YoYoString? = null
override fun getBundleExtras(extras: Bundle?) {
super.getBundleExtras(extras)
extras?.let {
mType = it.getInt(TRIGGER_TYPE, 0)
mPhoneTime = it.getInt(CALL_PHONE_TIME, 0)
mPhone = it.getString(CALL_PHONE_NUM, "")
}
}
override fun getContentViewLayoutID() = R.layout.activity_timing
override fun initViewsAndEvents() {
iv_close.setOnClickListener {
finish()
overridePendingTransition(0, 0)
}
initView()
}
private fun initView() {
when (mType) {
TRIGGER_TYPE_WIFI_BOOST -> { // wifi提速
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_wifi_boost, ivImg)
tvInfo.text = SpanUtils()
.append("检测到您的WIFI已连接\n快来进行")
.append("WIFI提速")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.red))
.append("吧!")
.create()
btnClean.text = "立即提速"
}
TRIGGER_TYPE_WIFI_TEST -> { // wifi测速
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_wifi_test, ivImg)
tvInfo.text = SpanUtils()
.append("检测到您的WIFI已连接\n快来进行")
.append("WIFI测速")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.red))
.append("吧!")
.create()
btnClean.text = "WIFI测速"
}
TRIGGER_TYPE_WIFI_SAFE -> { // wifi安全检测
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_wifi_safe, ivImg)
tvInfo.text = SpanUtils()
.append("检测到您的WIFI已连接\n快来进行")
.append("WIFI安全检测")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.red))
.append("吧!")
.create()
btnClean.text = "WIFI安全检测"
}
TRIGGER_TYPE_WIFI_DISCONNECT_TEST -> { // wifi断开时测速
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_wifi_test, ivImg)
tvInfo.text = SpanUtils()
.append("检测到您的WIFI已断开连接,网络质量\n有所下降,快来测试一下当前网速吧!")
.create()
btnClean.text = "网络测速"
}
TRIGGER_TYPE_WIFI_DISCONNECT_BOOST -> { // wifi断开时加速
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_wifi_boost, ivImg)
tvInfo.text = SpanUtils()
.append("检测到您的WIFI已断开连接,网络\n质量有所下降,快来进行网络优化吧!")
.create()
btnClean.text = "网络优化"
}
TRIGGER_TYPE_BOOST -> { // 一键加速
val usedPercentValue = SystemUtils.getUsedPercentValue(mContext)
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_boost, ivImg)
tvInfo.text = SpanUtils()
.append("检测到内存占用达到")
.append("${usedPercentValue}%\n加速后")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.red))
.append("可大幅提示手机运行速度")
.create()
btnClean.text = "一键加速"
}
TRIGGER_TYPE_SAVE_ELE -> { // 省电
AppConfig.fakeSaveBatteryCount = 1 + Random.nextInt(8)
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_save_ele, ivImg)
tvInfo.text = SpanUtils()
.append("检测到")
.append("${AppConfig.fakeSaveBatteryCount}个")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.red))
.append("应用耗电\n修复")
.append("耗电应用可节省更多电量")
.create()
btnClean.text = "一键省电"
}
TRIGGER_TYPE_PHONE -> { // 电话挂断
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_phone, ivImg)
tvInfo.text = SpanUtils()
.append("本次通话时长约${mPhoneTime}\n请问您是否需要:")
.create()
phoneContainer.visibility = View.VISIBLE
btnClean.visibility = View.GONE
}
}
btnCall.setOnClickListener {
OutAppRouter.goToCall(this, mPhone)
}
btnSms.setOnClickListener {
OutAppRouter.goToSms(this, mPhone)
}
btnClean.setOnClickListener {
val bundle = Bundle()
ExpressManager.loadExpress(false)
when (mType) {
TRIGGER_TYPE_WIFI_BOOST -> {
readyGoThenKill(SpeedFastActivity::class.java)
return@setOnClickListener
}
TRIGGER_TYPE_WIFI_TEST -> {
readyGoThenKill(SpeedTestActivity::class.java)
return@setOnClickListener
}
TRIGGER_TYPE_WIFI_SAFE -> {
bundle.putString(
Increasespeed2Activity.INCREASE2_TYPE,
Increasespeed2Activity.INCREASE2_SAFE_CHECK
)
readyGoThenKill(Increasespeed2Activity::class.java, bundle)
return@setOnClickListener
}
TRIGGER_TYPE_WIFI_DISCONNECT_BOOST -> {
AppConfig.isCanBoost = true
bundle.putString(
IncreasespeedActivity.INCREASE_TYPE,
IncreasespeedActivity.INCREASE_BOOST
)
}
TRIGGER_TYPE_WIFI_DISCONNECT_TEST -> {
readyGoThenKill(SpeedTestActivity::class.java)
return@setOnClickListener
}
TRIGGER_TYPE_BOOST -> {
AppConfig.isCanBoost = true
bundle.putString(
IncreasespeedActivity.INCREASE_TYPE,
IncreasespeedActivity.INCREASE_BOOST
)
}
TRIGGER_TYPE_SAVE_ELE -> { // 省电
AppConfig.isCanSaveBattery = true
bundle.putString(
IncreasespeedActivity.INCREASE_TYPE,
IncreasespeedActivity.INCREASE_SAVE_ELECTRICITY
)
}
}
readyGoThenKill(IncreasespeedActivity::class.java, bundle)
}
}
/**
* 初始化信息iyc
*/
private fun initExpress() {
try {
if (fl_ad != null) {
fl_ad.removeAllViews()
fl_ad.addView(ExpressManager.getAppOutExpressFrameLayout())
}
} catch (e: Exception) {
e.printStackTrace()
}
}
override fun isApplyKitKatTranslucency() = true
override fun finish() {
super.finish()
AlarmManager.getInstance().resetUserActionTime()
}
override fun onResume() {
super.onResume()
initExpress()
btnClean.postDelayed({
rope = YoYo.with(Techniques.Pulse).duration(500).repeat(10).playOn(btnClean)
}, 200)
}
override fun onDestroy() {
rope?.stop()
rope = null
super.onDestroy()
}
override fun onBackPressed() {
// 屏蔽返回键
// super.onBackPressed()
}
}
\ No newline at end of file
...@@ -145,8 +145,7 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -145,8 +145,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
needUseTime = data.needSeconds needUseTime = data.needSeconds
shCoin = data.coinSh shCoin = data.coinSh
sydCoin = data.coinSyd sydCoin = data.coinSyd
// shMax = data.CPD shMax = data.CPD
shMax = 1
cpdMax = data.CPD_SYD cpdMax = data.CPD_SYD
if ((shMax + cpdMax) <= 0) { if ((shMax + cpdMax) <= 0) {
......
...@@ -112,7 +112,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener, ...@@ -112,7 +112,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
private fun loadWifiData() { private fun loadWifiData() {
btn_signal.postDelayed({ btn_signal.postDelayed({
rope = YoYo.with(Techniques.Pulse).duration(1000).repeat(-1).playOn(btn_signal) rope = YoYo.with(Techniques.Pulse).duration(500).repeat(-1).playOn(btn_signal)
}, 200) }, 200)
if (wifiUtils.isWifiEnable) { if (wifiUtils.isWifiEnable) {
...@@ -472,17 +472,6 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener, ...@@ -472,17 +472,6 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
if (granted) { if (granted) {
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
loadWifiData() loadWifiData()
// 预加载信息流
ExpressManager.loadExpress(false)
val bundle = Bundle()
bundle.putString(
IncreasespeedActivity.INCREASE_TYPE,
IncreasespeedActivity.INCREASE_BOOST
)
readyGo(IncreasespeedActivity::class.java)
}, 1000) }, 1000)
} else { } else {
showMissingPermissionDialog("位置,存储") showMissingPermissionDialog("位置,存储")
......
...@@ -20,22 +20,22 @@ import com.mints.library.utils.GlideUtils ...@@ -20,22 +20,22 @@ import com.mints.library.utils.GlideUtils
class CircleCleanAnimationView @JvmOverloads constructor( class CircleCleanAnimationView @JvmOverloads constructor(
context: Context, context: Context,
attrs: AttributeSet? = null, attrs: AttributeSet? = null,
defStyleAttr: Int = 0, defStyleAttr: Int = 0
defStyleRes: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) { ) : FrameLayout(context, attrs, defStyleAttr) {
private lateinit var paintOut: Paint //外圈画笔 private lateinit var paintOut: Paint //外圈画笔
private lateinit var paintIn: Paint private lateinit var paintIn: Paint
private lateinit var paintIn2: Paint //内圈画笔 private lateinit var paintIn2: Paint
private lateinit var paintIn3: Paint //内圈画笔
private lateinit var bitmap: Bitmap private lateinit var bitmap: Bitmap
private var centerDrawableId = R.mipmap.ic_speed //中心图片ID private var centerDrawableId = R.mipmap.ic_speed //中心图片ID
private var im_Center: ImageView? = null private var imCenter: ImageView? = null
private var im_in: ImageView? = null private var imIn: ImageView? = null
private var im_out: ImageView? = null//中心图片控件 private var imOut: ImageView? = null//中心图片控件
private var rotateAnimation: RotateAnimation? = null //旋转动画 private var rotateAnimation: RotateAnimation? = null //旋转动画
private var scaleAnimation: ScaleAnimation? = null//放大缩小动画 private var scaleAnimation: ScaleAnimation? = null//放大缩小动画
private val imageCenterWidth = 300 //中心图片的宽度 private val imageCenterWidth = 300 //中心图片的宽度
private val imageCenterHeight = 300 //中心图片的高度 private val imageCenterHeight = 300 //中心图片的高度
private val LineStrokeWidth = 8 //线框的宽度 private val lineStrokeWidth = 8 //线框的宽度
private fun init( private fun init(
context: Context, context: Context,
...@@ -61,41 +61,56 @@ class CircleCleanAnimationView @JvmOverloads constructor( ...@@ -61,41 +61,56 @@ class CircleCleanAnimationView @JvmOverloads constructor(
paintOut.isAntiAlias = true //抗锯齿 paintOut.isAntiAlias = true //抗锯齿
paintOut.isDither = true //防抖 paintOut.isDither = true //防抖
paintOut.style = Paint.Style.STROKE //空心圆 paintOut.style = Paint.Style.STROKE //空心圆
paintOut.strokeWidth = LineStrokeWidth.toFloat() //线的宽度 paintOut.strokeWidth = lineStrokeWidth.toFloat() //线的宽度
paintOut.color = Color.parseColor("#10000000") // 设置圆弧的颜色 paintOut.color = Color.parseColor("#E6E6FA") // 设置圆弧的颜色
paintIn = Paint() paintIn = Paint()
paintIn.isAntiAlias = true paintIn.isAntiAlias = true
paintIn.isDither = true paintIn.isDither = true
paintIn.style = Paint.Style.STROKE paintIn.style = Paint.Style.STROKE
paintIn.strokeWidth = LineStrokeWidth.toFloat() paintIn.strokeWidth = lineStrokeWidth.toFloat()
val linearGradient = LinearGradient( val linearGradient = LinearGradient(
0f, 0f,
0f, 0f,
0f, 0f,
200f, 200f,
Color.parseColor("#FFDD0C"), Color.parseColor("#FFDD0C"),
// Color.parseColor("#11d4ff"),
Color.parseColor("#0000b3ff"), Color.parseColor("#0000b3ff"),
Shader.TileMode.MIRROR Shader.TileMode.MIRROR
) )
//渐变色
paintIn.shader = linearGradient paintIn.shader = linearGradient
paintIn2 = Paint() paintIn2 = Paint()
paintIn2.isAntiAlias = true paintIn2.isAntiAlias = true
paintIn2.isDither = true paintIn2.isDither = true
paintIn2.style = Paint.Style.STROKE paintIn2.style = Paint.Style.STROKE
paintIn2.strokeWidth = LineStrokeWidth.toFloat() paintIn2.strokeWidth = lineStrokeWidth.toFloat()
val linearGradient2 = LinearGradient( val linearGradient2 = LinearGradient(
0f, 0f,
0f, 0f,
0f, 0f,
200f, 200f,
Color.parseColor("#00FF7F"),
Color.parseColor("#0000b3ff"), Color.parseColor("#0000b3ff"),
// Color.parseColor("#11d4ff"),
Color.parseColor("#7EE2FF"),
Shader.TileMode.MIRROR Shader.TileMode.MIRROR
) //渐变色 )
paintIn2.shader = linearGradient2 paintIn2.shader = linearGradient2
paintIn3 = Paint()
paintIn3.isAntiAlias = true
paintIn3.isDither = true
paintIn3.style = Paint.Style.STROKE
paintIn3.strokeWidth = lineStrokeWidth.toFloat()
val linearGradient3 = LinearGradient(
0f,
0f,
0f,
200f,
Color.parseColor("#EE82EE"),
Color.parseColor("#0000b3ff"),
Shader.TileMode.MIRROR
)
paintIn3.shader = linearGradient3
} }
/** /**
...@@ -130,12 +145,12 @@ class CircleCleanAnimationView @JvmOverloads constructor( ...@@ -130,12 +145,12 @@ class CircleCleanAnimationView @JvmOverloads constructor(
layoutParams.gravity = Gravity.CENTER layoutParams.gravity = Gravity.CENTER
//中心的那张图片 //中心的那张图片
im_Center = ImageView(context) imCenter = ImageView(context)
im_Center!!.setImageBitmap(bitmap) imCenter!!.setImageBitmap(bitmap)
addView(im_Center, layoutParams) addView(imCenter, layoutParams)
//旋转线框(内圈) //旋转线框(内圈)
im_in = ImageView(context) imIn = ImageView(context)
val inWidth = imageCenterWidth + 95 val inWidth = imageCenterWidth + 95
val inHeight = imageCenterHeight + 95 val inHeight = imageCenterHeight + 95
val bitmapIn = Bitmap.createBitmap( val bitmapIn = Bitmap.createBitmap(
...@@ -145,20 +160,21 @@ class CircleCleanAnimationView @JvmOverloads constructor( ...@@ -145,20 +160,21 @@ class CircleCleanAnimationView @JvmOverloads constructor(
) )
val canvasIN = Canvas(bitmapIn) val canvasIN = Canvas(bitmapIn)
val rectF = RectF( val rectF = RectF(
LineStrokeWidth.toFloat(), lineStrokeWidth.toFloat(),
LineStrokeWidth.toFloat(), lineStrokeWidth.toFloat(),
(inWidth - LineStrokeWidth).toFloat(), (inWidth - lineStrokeWidth).toFloat(),
(inHeight - LineStrokeWidth).toFloat() (inHeight - lineStrokeWidth).toFloat()
) )
canvasIN.drawArc(rectF, -90f, 180f, false, paintIn!!) canvasIN.drawArc(rectF, -90f, 120f, false, paintIn)
canvasIN.drawArc(rectF, 90f, 180f, false, paintIn2!!) canvasIN.drawArc(rectF, 30f, 120f, false, paintIn2)
im_in!!.setImageBitmap(bitmapIn) canvasIN.drawArc(rectF, 150f, 120f, false, paintIn3)
imIn!!.setImageBitmap(bitmapIn)
val layoutParamsIn = LayoutParams(inWidth, inHeight) val layoutParamsIn = LayoutParams(inWidth, inHeight)
layoutParamsIn.gravity = Gravity.CENTER layoutParamsIn.gravity = Gravity.CENTER
addView(im_in, layoutParamsIn) addView(imIn, layoutParamsIn)
//放大缩小线框 //放大缩小线框
im_out = ImageView(context) imOut = ImageView(context)
val outWidth = inWidth + 100 val outWidth = inWidth + 100
val outHeight = inWidth + 100 val outHeight = inWidth + 100
val bitmapOut = Bitmap.createBitmap( val bitmapOut = Bitmap.createBitmap(
...@@ -170,14 +186,14 @@ class CircleCleanAnimationView @JvmOverloads constructor( ...@@ -170,14 +186,14 @@ class CircleCleanAnimationView @JvmOverloads constructor(
canvasOut.drawCircle( canvasOut.drawCircle(
outWidth / 2.toFloat(), outWidth / 2.toFloat(),
outHeight / 2.toFloat(), outHeight / 2.toFloat(),
(outWidth - LineStrokeWidth) / 2.toFloat(), (outWidth - lineStrokeWidth) / 2.toFloat(),
paintOut paintOut
) )
im_out!!.setImageBitmap(bitmapOut) imOut!!.setImageBitmap(bitmapOut)
val layoutParamsOut = val layoutParamsOut =
LayoutParams(outWidth, outHeight) LayoutParams(outWidth, outHeight)
layoutParamsOut.gravity = Gravity.CENTER layoutParamsOut.gravity = Gravity.CENTER
addView(im_out, layoutParamsOut) addView(imOut, layoutParamsOut)
} }
/** /**
...@@ -185,9 +201,8 @@ class CircleCleanAnimationView @JvmOverloads constructor( ...@@ -185,9 +201,8 @@ class CircleCleanAnimationView @JvmOverloads constructor(
* @param drawableId * @param drawableId
*/ */
fun setCenterImageView(drawableId: Int) { fun setCenterImageView(drawableId: Int) {
if (im_Center != null) { if (imCenter != null) {
GlideUtils.loadImageViewGif(context, drawableId, im_Center) GlideUtils.loadImageViewGif(context, drawableId, imCenter)
// im_Center!!.setImageResource(drawableId)
} }
} }
...@@ -195,8 +210,8 @@ class CircleCleanAnimationView @JvmOverloads constructor( ...@@ -195,8 +210,8 @@ class CircleCleanAnimationView @JvmOverloads constructor(
* 开始动画 * 开始动画
*/ */
fun startAnimation() { fun startAnimation() {
im_in!!.startAnimation(rotateAnimation) imIn!!.startAnimation(rotateAnimation)
im_out!!.startAnimation(scaleAnimation) imOut!!.startAnimation(scaleAnimation)
} }
fun stopAnimation() { fun stopAnimation() {
......
...@@ -133,6 +133,9 @@ public class WifiView extends FrameLayout implements View.OnClickListener { ...@@ -133,6 +133,9 @@ public class WifiView extends FrameLayout implements View.OnClickListener {
wifiOnAndNoBonus(); wifiOnAndNoBonus();
return; return;
} }
if (mCount == 4) {
progressBar.setComplete();
}
progressBar.resumeAnim(); progressBar.resumeAnim();
setTitle("WIFI已连接"); setTitle("WIFI已连接");
......
...@@ -64,6 +64,9 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall ...@@ -64,6 +64,9 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
} }
public static Activity getMain_activity() { public static Activity getMain_activity() {
if (main_activity.get() == null) {
return app_activity.get();
}
return main_activity.get(); return main_activity.get();
} }
......
package com.mints.flowbox.utils package com.mints.flowbox.utils.keepalive
import android.app.Notification import android.app.Notification
import android.app.NotificationChannel import android.app.NotificationChannel
......
...@@ -8,7 +8,6 @@ import android.os.Build; ...@@ -8,7 +8,6 @@ import android.os.Build;
import android.provider.Settings; import android.provider.Settings;
import com.mints.flowbox.MintsApplication; import com.mints.flowbox.MintsApplication;
import com.mints.flowbox.utils.NotificationUtils;
import net.phone.PhoneBrandUtils; import net.phone.PhoneBrandUtils;
...@@ -25,17 +24,17 @@ public class IntentUtils { ...@@ -25,17 +24,17 @@ public class IntentUtils {
public static void startActivity(Activity activity, Intent intent) { public static void startActivity(Activity activity, Intent intent) {
if (PhoneBrandUtils.isXiaomi() | PhoneBrandUtils.isVivo() | PhoneBrandUtils.isOppo()) { if (PhoneBrandUtils.isXiaomi() | PhoneBrandUtils.isVivo() | PhoneBrandUtils.isOppo()) {
if (!isRunningForeground(activity)) { // if (!isRunningForeground(activity)) {
// if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { // if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
moveToFront(activity); moveToFront(activity);
MintsApplication.getContext().startActivity(intent); MintsApplication.getContext().startActivity(intent);
activity.moveTaskToBack(true); activity.moveTaskToBack(true);
// } else { // } else {
// NotificationUtils.INSTANCE.sendNotificationFullScreen(activity, "", "", intent); // NotificationUtils.INSTANCE.sendNotificationFullScreen(activity, "", "", intent);
// } // }
} else { // } else {
MintsApplication.getContext().startActivity(intent); // MintsApplication.getContext().startActivity(intent);
} // }
} else { } else {
MintsApplication.getContext().startActivity(intent); MintsApplication.getContext().startActivity(intent);
} }
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white" android:state_checked="true" />
<item android:color="@color/black" android:state_checked="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent">
<com.mints.flowbox.ui.widgets.CircleCleanAnimationView
android:id="@+id/ccav_speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="120dp" android:layout_marginTop="100dp"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
android:background="@drawable/shape_bg_write" android:background="@drawable/shape_bg_write"
android:orientation="vertical" android:orientation="vertical"
...@@ -63,6 +63,13 @@ ...@@ -63,6 +63,13 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/ivImg"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
android:layout_margin="5dp" />
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -73,6 +80,7 @@ ...@@ -73,6 +80,7 @@
android:id="@+id/ivIcon" android:id="@+id/ivIcon"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:src="@mipmap/ic_launcher" android:src="@mipmap/ic_launcher"
android:visibility="gone" android:visibility="gone"
......
...@@ -2,7 +2,63 @@ ...@@ -2,7 +2,63 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white"> android:background="@color/color_20000000">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/adContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginStart="15dp"
android:layout_marginTop="180dp"
android:layout_marginEnd="15dp"
android:background="@mipmap/ic_app_out_background">
<ImageView
android:id="@+id/iv_close"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:src="@mipmap/ic_close" />
<TextView
android:id="@+id/tvContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginEnd="5dp"
android:drawableStart="@mipmap/ic_ok"
android:drawablePadding="6dp"
android:text="-"
android:textColor="@color/white"
android:textSize="20sp" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignTop="@id/tvContent"
android:layout_toEndOf="@id/tvContent"
android:src="@mipmap/ic_app_out_timing_star" />
</RelativeLayout>
<com.mints.flowbox.ui.widgets.RoundRectLayout
android:id="@+id/fl_ad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="15dp"
android:background="@drawable/shape_gold_card"
android:elevation="2dip" />
</androidx.appcompat.widget.LinearLayoutCompat>
<View <View
android:id="@+id/container" android:id="@+id/container"
...@@ -15,11 +71,5 @@ ...@@ -15,11 +71,5 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" /> android:layout_gravity="center" />
<!-- <ImageView-->
<!-- android:id="@+id/ivAnim"-->
<!-- android:layout_width="200dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center" />-->
</FrameLayout> </FrameLayout>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:scanLineDrawable="@drawable/scan_line" app:scanLineDrawable="@drawable/btn_progress_run"
app:scanLineHeight="0.25" /> app:scanLineHeight="0.25" />
</FrameLayout> </FrameLayout>
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container" android:id="@+id/container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:background="@color/transparent">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -15,7 +14,7 @@ ...@@ -15,7 +14,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_marginTop="50dp" android:layout_marginTop="40dp"
android:text="-" android:text="-"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="60sp" /> android:textSize="60sp" />
...@@ -107,10 +106,10 @@ ...@@ -107,10 +106,10 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginBottom="80dp" android:layout_marginBottom="80dp"
android:background="@color/color_20000000" android:background="@color/color_20000000"
android:drawableStart="@drawable/ic_launcher_main_mini"
android:drawablePadding="5dp" android:drawablePadding="5dp"
android:padding="5dp" android:padding="5dp"
android:text="@string/appName" android:text="@string/appName"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp" /> android:textSize="14sp"
app:drawableStartCompat="@drawable/ic_launcher_main_mini" />
</FrameLayout> </FrameLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@android:color/white"> android:background="@android:color/white">
<!-- 广点通开屏广告支持“半屏/全屏”展示,开发者可以把Logo区域放在屏幕底部,然后在Logo上方提供一个容器来放置半开屏广告,请注意此容器高度不得小于400dp --> <!-- 广点通开屏广告支持“半屏/全屏”展示,开发者可以把Logo区域放在屏幕底部,然后在Logo上方提供一个容器来放置半开屏广告,请注意此容器高度不得小于400dp -->
<!-- 1.Logo区域:展示半开屏广告时使用,如果想展示全开屏广告,可以不需要这个Logo区域 --> <RelativeLayout
<!-- 注意:如需要这个Logo区域,建议开发者使用自己的Logo资源,而不是联盟的Logo资源@drawable/gdt_splash_logo,资源规格可参照@drawable/gdt_splash_logo --> android:id="@+id/preContainer"
<ImageView
android:id="@+id/app_logo"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" <ImageView
android:layout_marginTop="10dp" android:id="@+id/app_logo"
android:src="@drawable/splash_bg" /> android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="200dp"
android:src="@drawable/ic_launcher_main" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/app_logo"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="体验更快的网络速度!"
android:textColor="@color/color_main"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/progressBar"
android:layout_centerHorizontal="true"
android:text="正在加载加速模块..."
android:textColor="@color/color_main"
android:textSize="16sp" />
<com.mints.flowbox.ui.widgets.CycleProgress
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/app_logo"
android:layout_alignParentBottom="true"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="50dp" />
</RelativeLayout>
<!-- 2.预设开屏图片区域: --> <!-- 2.预设开屏图片区域: -->
<!-- 开发者可以把自家App设计开屏图片摆放在这里,本示例中放置了一张静态图片。!--> <!-- 开发者可以把自家App设计开屏图片摆放在这里,本示例中放置了一张静态图片。!-->
...@@ -27,6 +61,5 @@ ...@@ -27,6 +61,5 @@
<FrameLayout <FrameLayout
android:id="@+id/splash_container" android:id="@+id/splash_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent" />
android:layout_above="@id/app_logo" />
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="120dp" android:layout_marginTop="100dp"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
android:background="@drawable/shape_bg_write" android:background="@drawable/shape_bg_write"
android:orientation="vertical"> android:orientation="vertical">
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<ImageView <ImageView
android:id="@+id/iv_close" android:id="@+id/iv_close"
android:layout_width="22dp" android:layout_width="20dp"
android:layout_height="22dp" android:layout_height="20dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_gravity="end|center_vertical" android:layout_gravity="end|center_vertical"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
...@@ -49,11 +49,11 @@ ...@@ -49,11 +49,11 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<ImageView <ImageView
android:id="@+id/ivImg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="100dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_margin="10dp" android:layout_margin="5dp" />
android:src="@mipmap/ic_launcher" />
<TextView <TextView
android:id="@+id/tvInfo" android:id="@+id/tvInfo"
...@@ -65,10 +65,44 @@ ...@@ -65,10 +65,44 @@
android:gravity="center" android:gravity="center"
android:text="-" android:text="-"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" android:textSize="16sp" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/ivIcon" <androidx.appcompat.widget.LinearLayoutCompat
app:layout_constraintTop_toBottomOf="@+id/tvTitle" /> android:id="@+id/phoneContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<Button
android:id="@+id/btnCall"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="@drawable/shape_green_light"
android:text="回拨"
android:textColor="@color/white"
android:textSize="14sp" />
<Button
android:id="@+id/btnSms"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="@drawable/shape_green_light"
android:text="短信"
android:textColor="@color/white"
android:textSize="14sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<Button <Button
android:id="@+id/btnClean" android:id="@+id/btnClean"
...@@ -81,11 +115,7 @@ ...@@ -81,11 +115,7 @@
android:background="@drawable/shape_green_light" android:background="@drawable/shape_green_light"
android:text="立即清理" android:text="立即清理"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" android:textSize="14sp" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvInfo2" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
android:id="@+id/container" android:id="@+id/container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:overScrollMode="never"> android:overScrollMode="never">
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true">
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
<ImageView <ImageView
android:id="@+id/imageView2" android:id="@+id/imageView2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginStart="10dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:src="@mipmap/ic_main_wifi" android:src="@mipmap/ic_main_wifi"
app:layout_constraintBottom_toBottomOf="@id/tv_wifi_info" app:layout_constraintBottom_toBottomOf="@id/tv_wifi_info"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
<?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="wrap_content"
android:layout_margin="4dp"
android:background="@color/white"
android:orientation="vertical">
<com.shehuan.niv.NiceImageView
android:id="@+id/ivXmlyPage"
android:layout_width="match_parent"
android:layout_height="180dp"
android:scaleType="fitXY"
android:src="@mipmap/bg_eat" />
<TextView
android:id="@+id/tvXmlyPageContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="6dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:text="123213112321311232131123213112321311232131123213112321311232131123213112321311232131"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tvXmlyPagecount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginBottom="6dp"
android:drawableLeft="@mipmap/ic_headset"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:text="7.2亿"
android:textColor="@color/color_AAA"
android:textSize="12sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="100dp">
<TextView
android:id="@+id/tv_index"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:textColor="@color/color_333"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="260dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/color_333"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@id/tv_count"
app:layout_constraintStart_toEndOf="@+id/tv_index"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="5dp"
android:drawableLeft="@mipmap/ic_headset"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:text="7.2亿"
android:textColor="@color/color_AAA"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/tv_index"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<ImageView
android:id="@+id/iv_islock"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginEnd="20dp"
android:src="@mipmap/icon_unlock"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/ic_close.png

860 Bytes | W: | H:

app/src/main/res/mipmap-xhdpi/ic_close.png

420 Bytes | W: | H:

app/src/main/res/mipmap-xhdpi/ic_close.png
app/src/main/res/mipmap-xhdpi/ic_close.png
app/src/main/res/mipmap-xhdpi/ic_close.png
app/src/main/res/mipmap-xhdpi/ic_close.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -4,6 +4,25 @@ ...@@ -4,6 +4,25 @@
<item name="edge_size">0dp</item> <item name="edge_size">0dp</item>
</style> </style>
<style name="AppTheme.LockScreen.Animation" parent="Animation.AppCompat.Dialog">
<item name="android:windowEnterAnimation">@null</item>
<item name="android:windowExitAnimation">@null</item>
<item name="android:windowShowAnimation">@null</item>
<item name="android:windowHideAnimation">@null</item>
<item name="android:activityCloseExitAnimation">@null</item>
<item name="android:activityOpenExitAnimation">@null</item>
<item name="android:activityCloseEnterAnimation">@null</item>
<item name="android:activityOpenEnterAnimation">@null</item>
<item name="android:taskCloseExitAnimation">@null</item>
<item name="android:taskOpenExitAnimation">@null</item>
<item name="android:taskToBackExitAnimation">@null</item>
<item name="android:taskToFrontExitAnimation">@null</item>
<item name="android:wallpaperCloseExitAnimation">@null</item>
<item name="android:wallpaperOpenExitAnimation">@null</item>
<item name="android:wallpaperIntraCloseExitAnimation">@null</item>
<item name="android:wallpaperIntraOpenExitAnimation">@null</item>
</style>
<style name="dialog" parent="@android:style/Theme.Dialog"> <style name="dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@color/color_0000</item> <item name="android:windowBackground">@color/color_0000</item>
<item name="android:windowFrame">@null</item> <item name="android:windowFrame">@null</item>
......
...@@ -16,27 +16,6 @@ ...@@ -16,27 +16,6 @@
<item name="android:windowBackground">@color/transparent</item> <item name="android:windowBackground">@color/transparent</item>
</style> </style>
<style name="OnePxActivityStyle" parent="Theme.AppCompat.Light.NoActionBar">
<!-- 窗体背景颜色为透明 -->
<item name="android:windowBackground">@android:color/transparent</item>
<!-- 窗体没有边框 -->
<item name="android:windowFrame">@null</item>
<!-- 窗体不包含标题栏 -->
<item name="android:windowNoTitle">true</item>
<!-- 窗体悬浮 -->
<item name="android:windowIsFloating">true</item>
<!-- 自定义TitleBar时去掉多余的阴影-->
<item name="android:windowContentOverlay">@null</item>
<!-- 不允许窗体背景变暗-->
<item name="android:backgroundDimEnabled">false</item>
<!-- 窗体切换无动画-->
<item name="android:windowAnimationStyle">@null</item>
<!-- 禁用窗口的预览动画-->
<item name="android:windowDisablePreview">true</item>
<item name="android:windowNoDisplay">false</item>
<item name="android:windowIsTranslucent">true</item>
</style>
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
......
...@@ -19,44 +19,11 @@ ...@@ -19,44 +19,11 @@
<string name="ssdk_telegram_client_inavailable">目前您的Telegram版本过低或未安装,需要安装才能使用</string> <string name="ssdk_telegram_client_inavailable">目前您的Telegram版本过低或未安装,需要安装才能使用</string>
<string name="ssdk_dont_keep_activitys_client">由于您已开启 不保留活动 ,导致授权功能无法正常使用.我们建议您点击左下方 设置 按钮,在 开发者选项 中关闭 不保留活动 功能.</string> <string name="ssdk_dont_keep_activitys_client">由于您已开启 不保留活动 ,导致授权功能无法正常使用.我们建议您点击左下方 设置 按钮,在 开发者选项 中关闭 不保留活动 功能.</string>
<string name="ssdk_sinaweibo">新浪微博</string>
<string name="ssdk_tencentweibo">腾讯微博</string>
<string name="ssdk_qzone">QQ空间</string> <string name="ssdk_qzone">QQ空间</string>
<string name="ssdk_wechat">微信好友</string> <string name="ssdk_wechat">微信好友</string>
<string name="ssdk_wechatmoments">微信朋友圈</string> <string name="ssdk_wechatmoments">微信朋友圈</string>
<string name="ssdk_wechatfavorite">微信收藏</string> <string name="ssdk_wechatfavorite">微信收藏</string>
<string name="ssdk_facebook">Facebook</string>
<string name="ssdk_twitter">Twitter</string>
<string name="ssdk_renren">人人网</string>
<string name="ssdk_kaixin">开心网</string>
<string name="ssdk_email">邮件</string>
<string name="ssdk_shortmessage">信息</string>
<string name="ssdk_sohumicroblog">搜狐微博</string>
<string name="ssdk_sohusuishenkan">搜狐随身看</string>
<string name="ssdk_neteasemicroblog">网易微博</string>
<string name="ssdk_douban">豆瓣</string>
<string name="ssdk_youdao">有道云笔记</string>
<string name="ssdk_evernote">印象笔记</string>
<string name="ssdk_linkedin">领英</string>
<string name="ssdk_googleplus">Google+</string>
<string name="ssdk_foursquare">FourSquare</string>
<string name="ssdk_qq">QQ</string>
<string name="ssdk_pinterest">Pinterest</string>
<string name="ssdk_flickr">Flickr</string>
<string name="ssdk_tumblr">Tumblr</string>
<string name="ssdk_dropbox">Dropbox</string>
<string name="ssdk_vkontakte">VK</string>
<string name="ssdk_instagram">Instagram</string>
<string name="ssdk_yixin">易信</string>
<string name="ssdk_yixinmoments">易信朋友圈</string>
<string name="ssdk_mingdao">明道</string>
<string name="ssdk_kakaotalk">KakaoTalk</string>
<string name="ssdk_kakaostory">KakaoStory</string>
<string name="ssdk_line">Line</string>
<string name="ssdk_bluetooth">蓝牙</string> <string name="ssdk_bluetooth">蓝牙</string>
<string name="ssdk_whatsapp">WhatsApp</string>
<string name="ssdk_pocket">Pocket</string>
<string name="ssdk_instapaper">Instapaper</string>
<string name="ssdk_instapaper_email">邮箱</string> <string name="ssdk_instapaper_email">邮箱</string>
<string name="ssdk_instapaper_pwd">密码</string> <string name="ssdk_instapaper_pwd">密码</string>
<string name="ssdk_instapaper_login">登录</string> <string name="ssdk_instapaper_login">登录</string>
...@@ -65,23 +32,12 @@ ...@@ -65,23 +32,12 @@
<string name="ssdk_facebookmessenger">Facebook Messenger</string> <string name="ssdk_facebookmessenger">Facebook Messenger</string>
<string name="ssdk_laiwang">来往</string> <string name="ssdk_laiwang">来往</string>
<string name="ssdk_laiwangmoments">来往动态</string> <string name="ssdk_laiwangmoments">来往动态</string>
<string name="ssdk_alipay">支付宝好友</string>
<string name="ssdk_alipaymoments">支付宝生活圈</string>
<string name="ssdk_plurk">Plurk</string>
<string name="ssdk_youtube">Youtube</string>
<string name="ssdk_dingding">钉钉</string>
<string name="ssdk_meipai">美拍</string>
<string name="ssdk_telegram">Telegram</string>
<string name="ssdk_share_to_qzone">分享到QQ空间</string> <string name="ssdk_share_to_qzone">分享到QQ空间</string>
<string name="ssdk_share_to_qq">分享到QQ</string> <string name="ssdk_share_to_qq">分享到QQ</string>
<string name="ssdk_share_to_facebook">分享到Facebook</string>
<string name="ssdk_mingdao_share_content">网页分享</string> <string name="ssdk_mingdao_share_content">网页分享</string>
<string name="ssdk_share_to_mingdao">分享到明道</string>
<string name="ssdk_share_to_googleplus">分享到Google+</string>
<string name="ssdk_share_to_qzone_default">来自%s的分享</string> <string name="ssdk_share_to_qzone_default">来自%s的分享</string>
<string name="ssdk_use_login_button">请改用“登录”按钮</string> <string name="ssdk_use_login_button">请改用“登录”按钮</string>
<string name="ssdk_share_to_youtube">分享到Youtube</string>
<string name="ssdk_gender_male"></string> <string name="ssdk_gender_male"></string>
<string name="ssdk_gender_female"></string> <string name="ssdk_gender_female"></string>
<string name="ssdk_symbol_ellipsis">...</string> <string name="ssdk_symbol_ellipsis">...</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment