From c768f369eb9b47184a2bfb2f99a00ca89d2c0bf0 Mon Sep 17 00:00:00 2001 From: Vance Vagell Date: Wed, 25 Dec 2024 13:36:45 -0500 Subject: [PATCH] Fix issue where two kv4p HTs can get in an ack loop. Shouldn't ack acks. --- .../main/java/com/vagell/kv4pht/radio/RadioAudioService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-src/KV4PHT/app/src/main/java/com/vagell/kv4pht/radio/RadioAudioService.java b/android-src/KV4PHT/app/src/main/java/com/vagell/kv4pht/radio/RadioAudioService.java index 65102d9..331d3e7 100644 --- a/android-src/KV4PHT/app/src/main/java/com/vagell/kv4pht/radio/RadioAudioService.java +++ b/android-src/KV4PHT/app/src/main/java/com/vagell/kv4pht/radio/RadioAudioService.java @@ -1210,7 +1210,7 @@ public void handlePacket(byte[] data) { MessagePacket messagePacket = new MessagePacket(infoField.getRawBytes(), aprsPacket.getDestinationCall()); // If the message was addressed to us, notify the user and ACK the message to the sender. - if (messagePacket.getTargetCallsign().trim().toUpperCase().equals(callsign.toUpperCase())) { + if (!messagePacket.isAck() && messagePacket.getTargetCallsign().trim().toUpperCase().equals(callsign.toUpperCase())) { showNotification(MESSAGE_NOTIFICATION_CHANNEL_ID, MESSAGE_NOTIFICATION_TO_YOU_ID, aprsPacket.getSourceCall() + " messaged you", messagePacket.getMessageBody(), MainActivity.INTENT_OPEN_CHAT); sendAckMessage(aprsPacket.getSourceCall().toUpperCase(), messagePacket.getMessageNumber());