Search in sources :

Example 1 with AcknowledgeInd

use of com.google.android.mms.pdu.AcknowledgeInd in project android-aosp-mms by slvn.

the class RetrieveTransaction method sendAcknowledgeInd.

private void sendAcknowledgeInd(RetrieveConf rc) throws MmsException, IOException {
    // Send M-Acknowledge.ind to MMSC if required.
    // If the Transaction-ID isn't set in the M-Retrieve.conf, it means
    // the MMS proxy-relay doesn't require an ACK.
    byte[] tranId = rc.getTransactionId();
    if (tranId != null) {
        // Create M-Acknowledge.ind
        AcknowledgeInd acknowledgeInd = new AcknowledgeInd(PduHeaders.CURRENT_MMS_VERSION, tranId);
        // insert the 'from' address per spec
        String lineNumber = MessageUtils.getLocalNumber();
        acknowledgeInd.setFrom(new EncodedStringValue(lineNumber));
        // Pack M-Acknowledge.ind and send it
        if (MmsConfig.getNotifyWapMMSC()) {
            sendPdu(new PduComposer(mContext, acknowledgeInd).make(), mContentLocation);
        } else {
            sendPdu(new PduComposer(mContext, acknowledgeInd).make());
        }
    }
}
Also used : EncodedStringValue(com.google.android.mms.pdu.EncodedStringValue) AcknowledgeInd(com.google.android.mms.pdu.AcknowledgeInd) PduComposer(com.google.android.mms.pdu.PduComposer)

Aggregations

AcknowledgeInd (com.google.android.mms.pdu.AcknowledgeInd)1 EncodedStringValue (com.google.android.mms.pdu.EncodedStringValue)1 PduComposer (com.google.android.mms.pdu.PduComposer)1