version:beta2.1.5
update: fix: add:增加发送锁屏息屏时状态
This commit is contained in:
@@ -41,9 +41,9 @@ android {
|
|||||||
//新平台正式
|
//新平台正式
|
||||||
newly {
|
newly {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 514
|
versionCode 515
|
||||||
//versionCode 1037
|
//versionCode 1037
|
||||||
versionName "2.1.4"
|
versionName "2.1.5"
|
||||||
/*********************************极光推送************************************/
|
/*********************************极光推送************************************/
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||||
@@ -55,13 +55,14 @@ android {
|
|||||||
/*********************************极光推送end************************************/
|
/*********************************极光推送end************************************/
|
||||||
buildConfigField "String", "ROOT_URL", '"http://name.jiaoguanyi.cn/api/"'
|
buildConfigField "String", "ROOT_URL", '"http://name.jiaoguanyi.cn/api/"'
|
||||||
buildConfigField "String", "WebsocketURL", '"ws://47.119.147.245:2345"'
|
buildConfigField "String", "WebsocketURL", '"ws://47.119.147.245:2345"'
|
||||||
|
buildConfigField "String", "SCREEN_URL", '"http://47.119.147.245:2018"'
|
||||||
}
|
}
|
||||||
|
|
||||||
//新平台测试
|
//新平台测试
|
||||||
beta {
|
beta {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 524
|
versionCode 525
|
||||||
versionName "2.1.4"
|
versionName "2.1.5"
|
||||||
/*********************************极光推送************************************/
|
/*********************************极光推送************************************/
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||||
@@ -73,6 +74,7 @@ android {
|
|||||||
/*********************************极光推送end************************************/
|
/*********************************极光推送end************************************/
|
||||||
buildConfigField "String", "ROOT_URL", '"http://name.uiuios.com/api/"'
|
buildConfigField "String", "ROOT_URL", '"http://name.uiuios.com/api/"'
|
||||||
buildConfigField "String", "WebsocketURL", '"ws://39.108.116.195:2345"'
|
buildConfigField "String", "WebsocketURL", '"ws://39.108.116.195:2345"'
|
||||||
|
buildConfigField "String", "SCREEN_URL", '"http://39.108.116.195:2018"'
|
||||||
}
|
}
|
||||||
|
|
||||||
// //老平台正式
|
// //老平台正式
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import com.arialyy.annotations.Download;
|
|||||||
import com.arialyy.aria.core.Aria;
|
import com.arialyy.aria.core.Aria;
|
||||||
import com.arialyy.aria.core.download.DownloadEntity;
|
import com.arialyy.aria.core.download.DownloadEntity;
|
||||||
import com.arialyy.aria.core.task.DownloadTask;
|
import com.arialyy.aria.core.task.DownloadTask;
|
||||||
|
import com.mjsheng.myappstore.BuildConfig;
|
||||||
import com.mjsheng.myappstore.manager.AmapManager;
|
import com.mjsheng.myappstore.manager.AmapManager;
|
||||||
import com.mjsheng.myappstore.network.HTTPInterface;
|
import com.mjsheng.myappstore.network.HTTPInterface;
|
||||||
import com.mjsheng.myappstore.network.api.newapi.GetLockStateApi;
|
import com.mjsheng.myappstore.network.api.newapi.GetLockStateApi;
|
||||||
@@ -314,6 +315,7 @@ public class GuardService extends Service {
|
|||||||
// Intent navIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
// Intent navIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||||
// context.sendBroadcast(navIntent);
|
// context.sendBroadcast(navIntent);
|
||||||
// }
|
// }
|
||||||
|
sendScreenStatus(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Intent.ACTION_SCREEN_OFF: {
|
case Intent.ACTION_SCREEN_OFF: {
|
||||||
@@ -331,6 +333,7 @@ public class GuardService extends Service {
|
|||||||
// Intent navIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
// Intent navIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||||
// context.sendBroadcast(navIntent);
|
// context.sendBroadcast(navIntent);
|
||||||
// }
|
// }
|
||||||
|
sendScreenStatus(2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "android.intent.action.FACTORY_RESET":
|
case "android.intent.action.FACTORY_RESET":
|
||||||
@@ -345,6 +348,29 @@ public class GuardService extends Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendScreenStatus(int status) {
|
||||||
|
// if (!JGYUtils.isBetaVersion()) {
|
||||||
|
// Log.e(TAG, "sendScreenStatus: " + JGYUtils.getCHANNEL_VALUE() + " not support");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
OkGo.post(BuildConfig.SCREEN_URL)
|
||||||
|
.params("key", NetInterfaceManager.HTTP_KEY)
|
||||||
|
.params("sn", Utils.getSerial())
|
||||||
|
.params("is_online", status)
|
||||||
|
.execute(new StringCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s, Call call, Response response) {
|
||||||
|
Log.e("sendScreenStatus", "onSuccess: " + s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Call call, Response response, Exception e) {
|
||||||
|
super.onError(call, response, e);
|
||||||
|
Log.e("sendScreenStatus", "onError: " + e.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void getLockState(String status, String time) {
|
private void getLockState(String status, String time) {
|
||||||
if (JGYUtils.isOfficialVersion()) {
|
if (JGYUtils.isOfficialVersion()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public class JGYUtils {
|
|||||||
public static int UnknowPlatform = 0;
|
public static int UnknowPlatform = 0;
|
||||||
public static String MTKTag = "MTK";
|
public static String MTKTag = "MTK";
|
||||||
public static String ZhanruiTag = "展锐";
|
public static String ZhanruiTag = "展锐";
|
||||||
|
public static String Other = "其他";
|
||||||
|
|
||||||
|
|
||||||
private JGYUtils(Context context) {
|
private JGYUtils(Context context) {
|
||||||
@@ -104,6 +105,10 @@ public class JGYUtils {
|
|||||||
return "beta".equals(channelValue);
|
return "beta".equals(channelValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getCHANNEL_VALUE() {
|
||||||
|
return JGYUtils.getInstance().getStringMetaData();
|
||||||
|
}
|
||||||
|
|
||||||
public void resetDevice() {
|
public void resetDevice() {
|
||||||
boolean isReset = MySQLData.GetBooleanData(mContext, CommonDatas.IS_RESET);
|
boolean isReset = MySQLData.GetBooleanData(mContext, CommonDatas.IS_RESET);
|
||||||
int batteryLevel = getBatteryLevel();
|
int batteryLevel = getBatteryLevel();
|
||||||
@@ -1205,6 +1210,17 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAppPlatform() {
|
||||||
|
String platform = BuildConfig.platform;
|
||||||
|
if ("MTK".equalsIgnoreCase(platform)) {
|
||||||
|
return MTKTag;
|
||||||
|
} else if ("ZhanRui".equalsIgnoreCase(platform)) {
|
||||||
|
return ZhanruiTag;
|
||||||
|
} else {
|
||||||
|
return Other;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void cleanLauncherCache() {
|
public void cleanLauncherCache() {
|
||||||
Log.e(TAG, "cleanLauncherCache: Start");
|
Log.e(TAG, "cleanLauncherCache: Start");
|
||||||
int cleaned = (int) SPUtils.get(mContext, "cleanLauncherCache", 0);
|
int cleaned = (int) SPUtils.get(mContext, "cleanLauncherCache", 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user