Search in sources :

Example 1 with AcknowledgeInd

use of com.google.android.mms.pdu_alt.AcknowledgeInd in project qksms by moezbhatti.

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 = Utils.getMyPhoneNumber(mContext);
        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_alt.EncodedStringValue) AcknowledgeInd(com.google.android.mms.pdu_alt.AcknowledgeInd) PduComposer(com.google.android.mms.pdu_alt.PduComposer)

Aggregations

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