-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":915,"versionName":"2108162337","enabled":true,"outputFile":"ICProtocol8.1_V915_2108162337_release.apk","fullName":"release","baseName":"release"},"path":"ICProtocol8.1_V915_2108162337_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":916,"versionName":"2108201434","enabled":true,"outputFile":"ICProtocol8.1_V916_2108201434_release.apk","fullName":"release","baseName":"release"},"path":"ICProtocol8.1_V916_2108201434_release.apk","properties":{}}]
\ No newline at end of file
import android.os.Handler;
import android.os.Message;
import android.os.Bundle;
+import android.view.Display;
import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
}
});
+ void resizeSquare(){
+ if (Util.needResizeSquare()){
+ Display display = getWindowManager().getDefaultDisplay(); // 为获取屏幕宽、高
+ Window window = getWindow();
+ ViewGroup.LayoutParams windowLayoutParams = window.getAttributes(); // 获取对话框当前的参数值
+ int width = display.getWidth();
+ int height = display.getHeight();
+ windowLayoutParams.width = (int)(width*0.8);//(int) (display.getWidth() * 0.7); // 宽度设置为屏幕的0.95
+ windowLayoutParams.height = (int)(height*0.8);//(int) (display.getHeight() * 0.6); // 高度设置为屏幕的0.6
+ ICLogger.d("Resize to " + windowLayoutParams.width +"X" + windowLayoutParams.height);
+ }
+ }
BTHelper btHelper=null;
@Override
protected void onCreate(Bundle savedInstanceState) {
// String cmdbuf="[IC*860359001000040*0005*RESET][IC*860359001000040*0002*CR][IC*860359001000040*0002*CR][IC*860359001000040*0008*POWEROFF][IC*860359001000040*0002*KA][IC*860359001000040*0002*KA][IC*860359001000040*0002*KA][IC*860359001000040*0002*KA][IC*860359001000040*0002*KA][IC*860359001000040*0002*KA][IC*860359001000040*0002*KA][IC*860359001000040*0002*LK][IC*860359001000040*0002*LK][IC*860359001000040*0002*LK]";
// parserCmd(cmdbuf.getBytes());
+
+ String hex = String.format("%08X",16);
+ ICLogger.d("getFZDDevStatus "+ 16 +" "+ hex);
+ resizeSquare();
}
private static final String CMD_HEADER = "[";
private static final String CMD_COMPANY = "IC";
* @return
*/
public String getFZDDevStatus(Runtime runtime) {
- StringBuilder sb = new StringBuilder();
- sb.append(Integer.toHexString(runtime.fzdDevStatus));
- if (sb.length() < 8) {
- for (int i = 0; i < 8 - sb.length(); i++)
- sb.insert(0, '0'); // pad with leading zero if needed
- }
- String hex = sb.toString();
+ String hex = String.format("%08X",runtime.fzdDevStatus);
return hex;
}
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
+import android.view.Display;
import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
import android.widget.Button;
+import com.ic.protocolSrv.utils.ICLogger;
import com.ic.protocolSrv.utils.SimSignalUtil;
import com.ic.protocolSrv.utils.Util;
//import com.ic.protocols.protocol_mqtt_client;
public class toolActivity extends Activity {
private static boolean usbstat=true;
+
+ void resizeSquare(){
+ if (Util.needResizeSquare()){
+ Display display = getWindowManager().getDefaultDisplay(); // 为获取屏幕宽、高
+ Window window = getWindow();
+ ViewGroup.LayoutParams windowLayoutParams = window.getAttributes(); // 获取对话框当前的参数值
+ int width = display.getWidth();
+ int height = display.getHeight();
+ windowLayoutParams.width = (int)(width*0.8);//(int) (display.getWidth() * 0.7); // 宽度设置为屏幕的0.95
+ windowLayoutParams.height = (int)(height*0.8);//(int) (display.getHeight() * 0.6); // 高度设置为屏幕的0.6
+ ICLogger.d("Resize to " + windowLayoutParams.width +"X" + windowLayoutParams.height);
+ }
+ }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Util.ShowToast(CoreService.getInstance().runtime,"Set ForceMoveCheck "+ Config.forceMoveCheck);
}
});
-
+ resizeSquare();
}
}
private static String FT6236U_upgrade_dev = "/sys/devices/platform/soc/soc:ap-apb/70800000.i2c/i2c-3/3-0038/ftsfwupdate";
private static String FT6236U_getver_dev = "/sys/devices/platform/soc/soc:ap-apb/70800000.i2c/i2c-3/3-0038/ftstpfwver";
+ public static boolean needResizeSquare(){
+ String modelname=getSystemProperties("ro.product.model","");
+ return (modelname.contains("C46")||modelname.contains("C48"));
+ }
public static void mSleep(int ms) {
try {
Thread.yield();
break;
case Config.PROTOCOL_FZD:
//获取天气信息
- connection.send(protocol_fzd.WT(runtime));
- connection.send(protocol_fzd.WT2(runtime));
+// connection.send(protocol_fzd.WT(runtime));
+// connection.send(protocol_fzd.WT2(runtime));
break;
case Config.PROTOCOL_MQTT:
break;
mConnection.DeliverCMDMessageToSystem("login", cmd);//通知下面线程状态变化
//测试一下
//mConnection.send(WG(mRuntime));
- // 登录完获取一下语音包
- mConnection.send(TKQ());
+ // 登录完获取一下语音包 不要在这里进行处理,这样无法做到通用。在login消息接收处 用protocolAPIHelper 查询才好。
+ // mConnection.send(TKQ());
break;
case KA:
ICLogger.i("服务器收到心跳包KA");
-#Mon Aug 16 23:37:10 CST 2021\r
-VERSION_CODE=915\r
+#Fri Aug 20 14:34:24 CST 2021\r
+VERSION_CODE=916\r