Java: Parse DLR from an Android SMS Gateway API

Featured illustration for Java: Parse DLR from an Android SMS Gateway API

Parse DLR in Java for an Android SMS Gateway API: webhook vs poll comparison, mappers, bulk/auto-reply adjacency.

Written by the SMS Gateway team for operators who run phones and airtime themselves — not for theoretical cloud SMS demos.

InformationAndroid SMS GatewayAPIDevelopers
Article
Published
November 12, 2024
Updated
November 18, 2024
Reading time
17 minute read

Key Takeaways

  • Java DLR parsing is HTTPS/JSON into your store — Jackson/Gson locally, not an SMS Gateway Java SDK.
  • HTTP 200 on send is accepted, not delivered. Persist the gateway message id and wait for DLR.
  • Unknown status strings fail closed. Confirm live enums in Developer Center.
  • Webhook push plus a poll repair job beats either alone when the phone was offline.
  • Auto-reply is inbound text, not a delivery report. Do not mash the mappers.
  • You bring the Android and operator credit. We meter devices and send volume.

Map JSON, trust the radio

Java parse DLR from an Android SMS gateway API is how your backend turns a status payload into something finance and support can trust: queued, sent, delivered, failed — stored against the message id you got at accept time. It is REST HTTPS/JSON. It is not a branded Java SDK, not Maven “complete SMS kit,” and not a rewrite of the Android SMS gateway API guide.

If your mapper treats unknown strings as delivered, you shipped optimism, not a delivery report.
A scan bar moving across four DLR status cells
Scanning “accepted” forever is not a delivery SLO.

Not a Java SDK product

Use the JDK HTTP client (or OkHttp) plus Jackson/Gson as a JSON mapper. Live path, headers, and enum names live in Developer Center— this spoke does not invent them. PHP’s parse-DLR sibling is the same physics in another language; do not clone it here. Product DLR behavior: SMS delivery reports.

Status families to persist

FamilyMeansJava handler
Accepted / queuedControl plane has the jobStore id; do not mark delivered
Sent / submittedModem handed to the operatorStill wait for DLR
DeliveredHandset ack (when the operator provides it)Idempotent upsert on message id
Failed / rejected / expiredRadio, voucher, or operatorSurface reason; do not blind-retry OTP
UnknownSchema driftFail closed; alert; check Developer Center

HMAC on webhooks. Duplicate callbacks must not double-count. Auto-reply inbound is a different mapper — see auto-reply and STOP.

Webhook vs poll repair

Prefer signed webhooks for near-real-time. Add a poll/repair job for rows stuck in accepted after the phone was offline. Device last-seen belongs in the same dashboard as pending DLR age. Confirm fields in Developer Center before you write the poll path.

Cost

You bring the Android and operator SMS credit. We meter devices plus platform volume. Failed sends and retries still hit the voucher. Free is 1 device / 300 SMS lifetime / 300 contacts — a bad soak test for DLR fixtures. See device and SMS volume pricing.

Checklist

  • No “Java SDK” branding in docs or comments.
  • Message id persisted at accept time.
  • Unknown status fails closed with an alert.
  • Webhook signature verified.
  • Poll repair for stuck accepted rows.
  • OTP retries not driven by DLR noise.
  • Inbound auto-reply mapper separate.
  • Developer Center checked for live enums.

Next steps

Cross-check the phone DLR in-depth guide if you need radio semantics, keep samples on PHP HTTPS/JSON as language cousins, and pair a handset in the device setup guide.

Jump to the live product docs for this topic—not another long-form article.

FAQ

Frequently asked questions

Direct answers about android sms gateway api.

Is there an official Java SDK for this gateway?

No. Use your HTTP client and JSON mapper against the REST API. Live fields live in Developer Center.

Does a successful send response mean delivered?

No. It means the control plane accepted the request. Delivery is radio plus operator. Parse DLR or status webhooks.

Does parsing DLR include carrier credit?

No. You still pay the operator for airtime. Service pricing is devices plus SMS send volume.
Keep learning

Topically related guides—chosen by subject overlap, not a fixed sitewide footer.

Information
java android sms gateway api

Java Android Sms Gateway Api: In-Depth Guide

Java Android Sms Gateway Api: In-Depth Guide. Long-tail article focused on exact query "java android sms gateway api". Expand with examples, limits, FAQ, and links to hub C. Priced by devices and SMS send volume; BYO phone and operator credit. Developer Center owns live API parameters.

Dec 1, 202516 min
Read article

Browse the full Android SMS gateway knowledge base or return to how an Android SMS gateway works.

Get started

Test the gateway on your own Android phone

Install the app, pair one device, and validate your API flow before choosing a paid plan.

You supply the phone, SIM, and operator SMS credit.