release 421
authorsnickersun <scy@incartech.cn>
Wed, 3 Jun 2020 11:15:48 +0000 (19:15 +0800)
committersnickersun <scy@incartech.cn>
Wed, 3 Jun 2020 11:15:48 +0000 (19:15 +0800)
1、去除 电池报警事件监控,只用电压数据进行验证。
2、添加ACTION_MESSAGE_SENT = "com.ic.action.message_sent";

app/release/ICSer_V418_2005201521_release.apk [deleted file]
app/release/ICSer_V419_2006030957_release.apk [deleted file]
app/release/ICSer_V421_2006031908_release.apk [new file with mode: 0644]
app/src/main/AndroidManifest.xml
app/src/main/java/com/enqualcomm/support/Constants.java
app/src/main/java/com/enqualcomm/support/CoreService.java
app/src/main/java/com/enqualcomm/support/service/SendChatMessage.java
app/src/main/java/com/enqualcomm/support/utils/BatteryUtil.java
app/src/main/java/com/enqualcomm/support/utils/ProcessReceiver.java
app/src/main/java/com/enqualcomm/support/utils/Util.java
app/version_code.properties

diff --git a/app/release/ICSer_V418_2005201521_release.apk b/app/release/ICSer_V418_2005201521_release.apk
deleted file mode 100644 (file)
index 57c9fab..0000000
Binary files a/app/release/ICSer_V418_2005201521_release.apk and /dev/null differ
diff --git a/app/release/ICSer_V419_2006030957_release.apk b/app/release/ICSer_V419_2006030957_release.apk
deleted file mode 100644 (file)
index 1ec6a1e..0000000
Binary files a/app/release/ICSer_V419_2006030957_release.apk and /dev/null differ
diff --git a/app/release/ICSer_V421_2006031908_release.apk b/app/release/ICSer_V421_2006031908_release.apk
new file mode 100644 (file)
index 0000000..707267d
Binary files /dev/null and b/app/release/ICSer_V421_2006031908_release.apk differ
index c9f8705..d262251 100644 (file)
                 <action android:name="com.ic.action.playtime" />
                 <action android:name="com.enqualcomm.support.ACTION_RETRY_SERVER_CONNECT" />
                 <action android:name="com.enqualcomm.support.ACTION_CHECK_LOCATION_RESULT" />
+                <action android:name= "com.ic.action.message_sent" />
                 <!-- <action android:name="com.eqc.heartrate.action.SILENT_START" /> -->
             </intent-filter>
         </receiver>
index 8448211..55278d5 100644 (file)
@@ -285,10 +285,12 @@ public interface Constants {
   public static final String ACTION_CHECK_LOCATION_RESULT = "com.enqualcomm.support.ACTION_CHECK_LOCATION_RESULT";\r
 \r
 \r
+  public static final String ACTION_MESSAGE_SENT = "com.ic.action.message_sent";\r
   public static final String ACTION_MESSAGE_RECEIVED = "com.ic.action.message_received";\r
   public static final String KEY_MESSAGE_TYPE = "msgType";  //  分为 voice ,pic ,和 text\r
   public static final String KEY_MESSAGE_URL = "msgUrl";  //  消息为 voice和 pic 此纪录为 路径, text消息则直接是消息内容。 utf-8 格式String\r
   public static final String KEY_MESSAGE_FROM = "msgFrom"; // 消息来源(发送者名称),预留,暂时不用。\r
 \r
+\r
 }\r
 \r
index f778fde..6300ee6 100644 (file)
@@ -472,6 +472,9 @@ public class CoreService extends Service {
     public Runtime getRuntime(){\r
         return runtime;\r
     }\r
+    public NettyConnection getConnection(){\r
+        return connection;\r
+    }\r
 \r
     @Override\r
     public void onCreate() {\r
index bdaab22..637e3be 100644 (file)
@@ -152,7 +152,7 @@ public class SendChatMessage extends AbstractInvokeHandlerService {
 \r
 \r
           // 把voiceContent拆解成1024的分包\r
-            Util.parseToVoicePacketSent(voiceContent, runtime);\r
+            Util.parseToVoicePacketSent(voiceContent);\r
             //trigger 分包发送\r
             ((NettyConnection) paramConnection).DeliverCMDMessageToSystem("SentVoicePacket", "");\r
 \r
index cfeeb88..a39055a 100644 (file)
@@ -88,11 +88,11 @@ public class BatteryUtil {
           }\r
 \r
         }else if (Intent.ACTION_BATTERY_LOW.equals(intent.getAction())) {\r
-          mRuntime.setBatteryLow(true);\r
-          if (Config.LOG_TOFILE) ICLogger.logToFile("Battery","BatteryLow !");\r
-          mRuntime.setAlarmType(false,mRuntime.getBatteryLow(),false,false);\r
+        //  mRuntime.setBatteryLow(true);\r
+       //   if (Config.LOG_TOFILE) ICLogger.logToFile("Battery","BatteryLow !");\r
+        //  mRuntime.setAlarmType(false,mRuntime.getBatteryLow(),false,false);\r
           //trigger AP10 报警定位\r
-          connection.send(protocolAPIHelper.genStringMessage("AP10",protocolAPIHelper.getWarningMSG(mRuntime)));\r
+       //   connection.send(protocolAPIHelper.genStringMessage("AP10",protocolAPIHelper.getWarningMSG(mRuntime)));\r
 \r
         }else if (Intent.ACTION_BATTERY_OKAY.equals(intent.getAction())){\r
           ICLogger.i("Battery OKAY !");\r
index f7c3c9d..0c89870 100644 (file)
@@ -10,6 +10,7 @@ import android.content.Intent;
 import android.media.RingtoneManager;\r
 import android.net.Uri;\r
 import android.os.Handler;\r
+import android.os.Messenger;\r
 import android.os.PowerManager;\r
 import android.os.Vibrator;\r
 import android.support.v4.app.NotificationCompat;\r
@@ -23,6 +24,7 @@ import com.enqualcomm.support.CoreService;
 import com.enqualcomm.support.LocationClient;\r
 import com.enqualcomm.support.R;\r
 import com.enqualcomm.support.bean.NotificationParam;\r
+import com.enqualcomm.support.bean.VoiceContent;\r
 import com.ic.jni.ICJniUtils;\r
 import com.enqualcomm.support.bean.Contact;\r
 import com.enqualcomm.support.service.AudioService;\r
@@ -41,15 +43,20 @@ import static android.os.PowerManager.ACQUIRE_CAUSES_WAKEUP;
 import static android.os.PowerManager.SCREEN_DIM_WAKE_LOCK;\r
 import static com.enqualcomm.support.Constants.ACTION_CLOSE_UNREAD_MSG;\r
 import static com.enqualcomm.support.Constants.ACTION_HEATR_RATE_START;\r
+import static com.enqualcomm.support.Constants.ACTION_MESSAGE_SENT;\r
 import static com.enqualcomm.support.Constants.ACTION_PLAYTIME;\r
 import static com.enqualcomm.support.Constants.ACTION_REMOTE_CAMERA;\r
 import static com.enqualcomm.support.Constants.ACTION_SEND_EMEGENCY_LOCATION_START;\r
 import static com.enqualcomm.support.Constants.ACTION_SEND_SOS_MSG;\r
 import static com.enqualcomm.support.Constants.ACTION_SHUTDOWN;\r
 import static com.enqualcomm.support.Constants.DIALOG_ACTION;\r
+import static com.enqualcomm.support.Constants.KEY_MESSAGE_FROM;\r
+import static com.enqualcomm.support.Constants.KEY_MESSAGE_TYPE;\r
+import static com.enqualcomm.support.Constants.KEY_MESSAGE_URL;\r
 import static com.enqualcomm.support.Constants.RESUME_ACTION;\r
 import static com.enqualcomm.support.Constants.SOS_ACTION;\r
 import static com.enqualcomm.support.Constants.STEP_COUNT_ALARM_ACTION;\r
+import static com.enqualcomm.support.bean.Content.CONTACT_CATEGORY_GROUP;\r
 \r
 public class ProcessReceiver extends BroadcastReceiver {\r
   private static final int MICRO_CHAT = 2;\r
@@ -222,6 +229,23 @@ public class ProcessReceiver extends BroadcastReceiver {
     if (RESUME_ACTION.equals(str)) {\r
       SharPreferenceUtil.setPrefBoolean(paramContext, "key_is_resume", paramIntent.getBooleanExtra("is_resume", false));\r
       return;\r
+    }else if (ACTION_MESSAGE_SENT.equals(str)) {\r
+\r
+      String msgType=paramIntent.getStringExtra(KEY_MESSAGE_TYPE);\r
+      String msgFrom=paramIntent.getStringExtra(KEY_MESSAGE_FROM);\r
+      String msgUrl=paramIntent.getStringExtra(KEY_MESSAGE_URL);\r
+    ICLogger.i("receive msg to send type="+msgType+", msg from = "+msgFrom+", msgUrl"+msgUrl);\r
+      if (msgType.equals("voice"))\r
+      {\r
+        //创建voiceConent并添加到数据\r
+        final VoiceContent voiceContent = VoiceContent.placeHolderOut(CONTACT_CATEGORY_GROUP, msgFrom, msgUrl);\r
+\r
+        // 把voiceContent拆解成1024的分包\r
+        Util.parseToVoicePacketSent(voiceContent);\r
+        //trigger 分包发送\r
+        if (CoreService.getInstance().getConnection()!=null)\r
+          CoreService.getInstance().getConnection().DeliverCMDMessageToSystem("SentVoicePacket", "");\r
+      }\r
     }else if (ACTION_SHUTDOWN.equals(str)) {\r
 \r
       playshutdownsound(paramContext);\r
index 5dffdde..429ad9b 100644 (file)
@@ -796,7 +796,7 @@ public class Util {
   }\r
 \r
 \r
-  public static boolean parseToVoicePacketSent(VoiceContent voiceContent,Runtime runtime){\r
+  public static boolean parseToVoicePacketSent(VoiceContent voiceContent){\r
 \r
     long filesize;\r
     File  voicefile=new File(voiceContent.content);\r
index 1f8304f..c67cb1a 100644 (file)
@@ -1,2 +1,2 @@
-#Wed Jun 03 09:57:39 CST 2020\r
-VERSION_CODE=419\r
+#Wed Jun 03 19:08:31 CST 2020\r
+VERSION_CODE=421\r