}\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
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
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
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
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