Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with long messages more than 160 characters #8

Open
bit7c9-dev opened this issue May 1, 2024 · 1 comment
Open

Does not work with long messages more than 160 characters #8

bit7c9-dev opened this issue May 1, 2024 · 1 comment

Comments

@bit7c9-dev
Copy link

bit7c9-dev commented May 1, 2024

Using this library when texting long messages (more than 160 characters), it return SMS sent but the message is not sent.

@bit7c9-dev bit7c9-dev changed the title Does not work with long messages with spaces Does not work with long messages more than 160 characters May 1, 2024
@lf-novelt
Copy link

Solution is quite simple:
Code to change here

use sendMultipartTextMessage instead of sendTextMessage if long message

    ArrayList<String> parts = smsManager.divideMessage(longMessage);
    smsManager.sendMultipartTextMessage(phoneNumber, null, parts, null, null);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants