Search in sources :

Example 1 with NotifyRespInd

use of com.google.android.mms.pdu_alt.NotifyRespInd in project Signal-Android by signalapp.

the class IncomingLegacyMmsConnection method sendRetrievedAcknowledgement.

private void sendRetrievedAcknowledgement(byte[] transactionId, boolean usingRadio, boolean useProxy) throws ApnUnavailableException {
    try {
        NotifyRespInd notifyResponse = new NotifyRespInd(PduHeaders.CURRENT_MMS_VERSION, transactionId, PduHeaders.STATUS_RETRIEVED);
        OutgoingLegacyMmsConnection connection = new OutgoingLegacyMmsConnection(context);
        connection.sendNotificationReceived(new PduComposer(context, notifyResponse).make(), usingRadio, useProxy);
    } catch (InvalidHeaderValueException | IOException e) {
        Log.w(TAG, e);
    }
}
Also used : NotifyRespInd(com.google.android.mms.pdu_alt.NotifyRespInd) InvalidHeaderValueException(com.google.android.mms.InvalidHeaderValueException) IOException(java.io.IOException) PduComposer(com.google.android.mms.pdu_alt.PduComposer)

Example 2 with NotifyRespInd

use of com.google.android.mms.pdu_alt.NotifyRespInd in project Signal-Android by WhisperSystems.

the class IncomingLegacyMmsConnection method sendRetrievedAcknowledgement.

private void sendRetrievedAcknowledgement(byte[] transactionId, boolean usingRadio, boolean useProxy) throws ApnUnavailableException {
    try {
        NotifyRespInd notifyResponse = new NotifyRespInd(PduHeaders.CURRENT_MMS_VERSION, transactionId, PduHeaders.STATUS_RETRIEVED);
        OutgoingLegacyMmsConnection connection = new OutgoingLegacyMmsConnection(context);
        connection.sendNotificationReceived(new PduComposer(context, notifyResponse).make(), usingRadio, useProxy);
    } catch (InvalidHeaderValueException | IOException e) {
        Log.w(TAG, e);
    }
}
Also used : NotifyRespInd(com.google.android.mms.pdu_alt.NotifyRespInd) InvalidHeaderValueException(com.google.android.mms.InvalidHeaderValueException) IOException(java.io.IOException) PduComposer(com.google.android.mms.pdu_alt.PduComposer)

Example 3 with NotifyRespInd

use of com.google.android.mms.pdu_alt.NotifyRespInd in project Signal-Android by WhisperSystems.

the class IncomingLollipopMmsConnection method sendRetrievedAcknowledgement.

private void sendRetrievedAcknowledgement(byte[] transactionId, int mmsVersion, int subscriptionId) {
    try {
        NotifyRespInd retrieveResponse = new NotifyRespInd(mmsVersion, transactionId, PduHeaders.STATUS_RETRIEVED);
        new OutgoingLollipopMmsConnection(getContext()).send(new PduComposer(getContext(), retrieveResponse).make(), subscriptionId);
    } catch (UndeliverableMessageException e) {
        Log.w(TAG, e);
    } catch (InvalidHeaderValueException e) {
        Log.w(TAG, e);
    }
}
Also used : NotifyRespInd(com.google.android.mms.pdu_alt.NotifyRespInd) UndeliverableMessageException(org.thoughtcrime.securesms.transport.UndeliverableMessageException) InvalidHeaderValueException(com.google.android.mms.InvalidHeaderValueException) PduComposer(com.google.android.mms.pdu_alt.PduComposer)

Example 4 with NotifyRespInd

use of com.google.android.mms.pdu_alt.NotifyRespInd in project Signal-Android by signalapp.

the class IncomingLollipopMmsConnection method sendRetrievedAcknowledgement.

private void sendRetrievedAcknowledgement(byte[] transactionId, int mmsVersion, int subscriptionId) {
    try {
        NotifyRespInd retrieveResponse = new NotifyRespInd(mmsVersion, transactionId, PduHeaders.STATUS_RETRIEVED);
        new OutgoingLollipopMmsConnection(getContext()).send(new PduComposer(getContext(), retrieveResponse).make(), subscriptionId);
    } catch (UndeliverableMessageException e) {
        Log.w(TAG, e);
    } catch (InvalidHeaderValueException e) {
        Log.w(TAG, e);
    }
}
Also used : NotifyRespInd(com.google.android.mms.pdu_alt.NotifyRespInd) UndeliverableMessageException(org.thoughtcrime.securesms.transport.UndeliverableMessageException) InvalidHeaderValueException(com.google.android.mms.InvalidHeaderValueException) PduComposer(com.google.android.mms.pdu_alt.PduComposer)

Aggregations

InvalidHeaderValueException (com.google.android.mms.InvalidHeaderValueException)4 NotifyRespInd (com.google.android.mms.pdu_alt.NotifyRespInd)4 PduComposer (com.google.android.mms.pdu_alt.PduComposer)4 IOException (java.io.IOException)2 UndeliverableMessageException (org.thoughtcrime.securesms.transport.UndeliverableMessageException)2