traccar / traccar-sms-gateway

Traccar SMS Gateway for Android
GNU General Public License v3.0
639 stars 102 forks source link

MMS Support #17

Open benjamin-kirkbride opened 1 year ago

benjamin-kirkbride commented 1 year ago

Is there any way to send an MMS?

gregjotau commented 11 months ago

@tananaev I have enabled the "send long messages as MMS" in the app, but they do not seem to be sent, and if I get over 160 it is not sent, not even split:

https://github.com/traccar/traccar-sms-gateway/pull/10

This seems to fix this, but apparently not happening for me at least.

tananaev commented 11 months ago

Are you talking about API calls or messages you send from the app itself?

gregjotau commented 11 months ago

Are you talking about API calls or messages you send from the app itself?

API calls

tananaev commented 11 months ago

API calls are different. App settings are only applied to what you send from the app itself.

gregjotau commented 11 months ago

API calls are different. App settings are only applied to what you send from the app itself.

OK, is there another parameter or payload I can use to make SMS work with the API?

Ref. https://www.traccar.org/http-sms-api/ has no docs on it. Sorry for being lazy not checking the source code :p

gregjotau commented 11 months ago

I think I might have found the issue, will test later and get back to this thread if I solve it :)

tananaev commented 11 months ago

There's no configuration parameter for it currently.

gregjotau commented 11 months ago

There's no configuration parameter for it currently.

OK, so it is expected not to work? - I tested manually in the app and it works to send MMS, but it fails with the API 🥲

gregjotau commented 11 months ago

I might make a PR if it does not work, is that something you want @tananaev?

Have to use:

https://github.com/traccar/traccar-sms-gateway/blob/9a860e3938d8a6c518c49300ea598668edfd6553/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/MessagingUtils.kt#L136C19-L136C19

In the API code somewhere, the GateWayService:

https://github.com/traccar/traccar-sms-gateway/blob/9a860e3938d8a6c518c49300ea598668edfd6553/app/src/traccar/kotlin/org/traccar/gateway/GatewayService.kt#L76

tananaev commented 11 months ago

Sure, feel free to send a PR.