Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

android-smsmms

> 编程语言
Open source

Library for easily sending SMS and MMS for Android devices

697 stars0 likes1 views
WebsiteGitHub

About

Library for easily sending SMS and MMS for Android devices

Android SMS/MMS Sending Library

These are the APIs that Google has so far left out of the Android ecosystem for easily sending any type of message without digging through source code and what not.

If you've got a better way to do things, send me a pull request! The library was created specifically for Sliding Messaging Pro and EvolveSMS and some things work the way they do specifically for those apps.

It's now used in Pulse as well.


Library Overview

Sending messages is very easy to do.

First, create a settings object with all of your required information for what you want to do. If you don't set something, then it will just be set to a default and that feature may not work. For example, if you need MMS, set the MMSC, proxy, and port, or else you will get an error every time.

java
Settings sendSettings = new Settings();

Next, attach that settings object to the sender

java
Transaction sendTransaction = new Transaction(mContext, sendSettings);

Now, create the Message you want to send

java
Message mMessage = new Message(textToSend, addressToSendTo);
mMessage.setImage(mBitmap);   // not necessary for voice or sms messages

And then all you have to do is send the message

java
sendTransaction.sendNewMessage(message, threadId)

Note: threadId can be nullified (using Transaction.NO_THREAD_ID), but this sometimes results in a new thread being created instead of the message being added to an existing thread

If you want to send MMS messages, be sure to add this to your manifest:

xml

That's it, you're done sending :)

You'll also need to register a few receivers for when the messages have been sent and for delivery reports to mark them as read... In your manifest, add these lines:

xml

Be sure to replace the [insert package name here] with your package name defined in the manifest. For example, Sliding Messaging's is com.klinker.android.messaging_donate.

Lastly, you'll need to include permissions in your manifest depending on what you want to do. Here are all of them (there are a lot unfortunately):

xml

Using on Lollipop+ devices

If you are using this on devices with Android 5.0 or higher, then a simpler method of sending is available.

java
Settings settings = new Settings();
settings.setUseSystemSending(true);
Transaction transaction = new Transaction(mContext, settings);
Message message = new Message(textToSend, addressToSendTo);
message.setImage(mBitmap);
transaction.sendNewMessage(message, threadId)

This will invoke the MMS APIs that were made available in SDK 21. It is recommended over the old approach since you no longer need to ask the user for APNs and much less setup is necessary. The option will only be applied when the device has SDK 21 or higher, otherwise it will fall back to the old method.

For full details on how to implement, please check out the sample application. It has more information on permissions, creating a transaction and sending a message.


Dependencies Information

To include in your gradle project:

groovy
compile 'com.klinkerapps:android-smsmms:5.2.6'

License

Copyright 2017 Jacob Klinker

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言