本文整理汇总了Java中ws.com.google.android.mms.pdu.SendConf.getMessageId方法的典型用法代码示例。如果您正苦于以下问题:Java SendConf.getMessageId方法的具体用法?Java SendConf.getMessageId怎么用?Java SendConf.getMessageId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ws.com.google.android.mms.pdu.SendConf
的用法示例。
在下文中一共展示了SendConf.getMessageId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSendResult
import ws.com.google.android.mms.pdu.SendConf; //导入方法依赖的package包/类
private MmsSendResult getSendResult(SendConf conf, SendReq message)
throws UndeliverableMessageException
{
if (conf == null) {
throw new UndeliverableMessageException("No M-Send.conf received in response to send.");
} else if (conf.getResponseStatus() != PduHeaders.RESPONSE_STATUS_OK) {
throw new UndeliverableMessageException("Got bad response: " + conf.getResponseStatus());
} else if (isInconsistentResponse(message, conf)) {
throw new UndeliverableMessageException("Mismatched response!");
} else {
return new MmsSendResult(conf.getMessageId(), conf.getResponseStatus());
}
}
示例2: sendMms
import ws.com.google.android.mms.pdu.SendConf; //导入方法依赖的package包/类
private MmsSendResult sendMms(MasterSecret masterSecret, MmsRadio radio, SendReq message,
boolean usingMmsRadio, boolean useProxy)
throws IOException, UndeliverableMessageException, InsecureFallbackApprovalException
{
String number = ((TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE)).getLine1Number();
boolean upgradedSecure = false;
if (MmsDatabase.Types.isSecureType(message.getDatabaseMessageBox())) {
message = getEncryptedMessage(masterSecret, message);
upgradedSecure = true;
}
if (number != null && number.trim().length() != 0) {
message.setFrom(new EncodedStringValue(number));
}
try {
OutgoingMmsConnection connection = new OutgoingMmsConnection(context, radio.getApnInformation(), new PduComposer(context, message).make());
SendConf conf = connection.send(usingMmsRadio, useProxy);
for (int i=0;i<message.getBody().getPartsNum();i++) {
Log.w(TAG, "Sent MMS part of content-type: " + new String(message.getBody().getPart(i).getContentType()));
}
if (conf == null) {
throw new UndeliverableMessageException("No M-Send.conf received in response to send.");
} else if (conf.getResponseStatus() != PduHeaders.RESPONSE_STATUS_OK) {
throw new UndeliverableMessageException("Got bad response: " + conf.getResponseStatus());
} else if (isInconsistentResponse(message, conf)) {
throw new UndeliverableMessageException("Mismatched response!");
} else {
return new MmsSendResult(conf.getMessageId(), conf.getResponseStatus(), upgradedSecure, false);
}
} catch (ApnUnavailableException aue) {
throw new IOException("no APN was retrievable");
}
}
示例3: getSendResult
import ws.com.google.android.mms.pdu.SendConf; //导入方法依赖的package包/类
private MmsSendResult getSendResult(SendConf conf, SendReq message, boolean upgradedSecure)
throws UndeliverableMessageException
{
if (conf == null) {
throw new UndeliverableMessageException("No M-Send.conf received in response to send.");
} else if (conf.getResponseStatus() != PduHeaders.RESPONSE_STATUS_OK) {
throw new UndeliverableMessageException("Got bad response: " + conf.getResponseStatus());
} else if (isInconsistentResponse(message, conf)) {
throw new UndeliverableMessageException("Mismatched response!");
} else {
return new MmsSendResult(conf.getMessageId(), conf.getResponseStatus(), upgradedSecure, false);
}
}
示例4: sendMms
import ws.com.google.android.mms.pdu.SendConf; //导入方法依赖的package包/类
private MmsSendResult sendMms(SendReq message, boolean usingMmsRadio, boolean useProxy)
throws IOException, UndeliverableMessageException, InsecureFallbackApprovalException
{
String number = ((TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE)).getLine1Number();
boolean upgradedSecure = false;
if (MmsDatabase.Types.isSecureType(message.getDatabaseMessageBox())) {
message = getEncryptedMessage(message);
upgradedSecure = true;
}
if (number != null && number.trim().length() != 0) {
message.setFrom(new EncodedStringValue(number));
}
SendConf conf = MmsSendHelper.sendMms(context, new PduComposer(context, message).make(),
radio.getApnInformation(), usingMmsRadio, useProxy);
for (int i=0;i<message.getBody().getPartsNum();i++) {
Log.w("MmsSender", "Sent MMS part of content-type: " + new String(message.getBody().getPart(i).getContentType()));
}
if (conf == null) {
throw new UndeliverableMessageException("No M-Send.conf received in response to send.");
} else if (conf.getResponseStatus() != PduHeaders.RESPONSE_STATUS_OK) {
throw new UndeliverableMessageException("Got bad response: " + conf.getResponseStatus());
} else if (isInconsistentResponse(message, conf)) {
throw new UndeliverableMessageException("Mismatched response!");
} else {
return new MmsSendResult(conf.getMessageId(), conf.getResponseStatus(), upgradedSecure, false);
}
}