Add SMS actions: Send SMS and Compose SMS#1849
Merged
Conversation
Co-authored-by: sds100 <16245954+sds100@users.noreply.github.com>
Co-authored-by: sds100 <16245954+sds100@users.noreply.github.com>
Co-authored-by: sds100 <16245954+sds100@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add action to send SMS functionality
Add SMS actions: Send SMS and Compose SMS
Oct 19, 2025
sds100
requested changes
Oct 19, 2025
Collaborator
There was a problem hiding this comment.
@copilot Instead of showing two dialogs can you use a jetpack compose bottom sheet instead? Look at how the other action bottom sheets are implemented.
Contributor
Author
There was a problem hiding this comment.
Done in commit d774d78. Created SmsActionBottomSheet following the pattern of HttpRequestBottomSheet with text fields for phone number and message. The bottom sheet validates inputs before allowing submission.
| } | ||
|
|
||
| @Serializable | ||
| sealed class Sms : ActionData() { |
Co-authored-by: sds100 <16245954+sds100@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements two new actions for sending SMS messages, addressing issue requirements for SMS functionality in Key Mapper.
New Actions
1. Send SMS
Instantly sends an SMS message to a specified phone number with a predefined message. Uses
ACTION_SENDTOintent to send the message directly through the default messaging app.2. Compose SMS
Opens the messaging app with a pre-filled SMS message, allowing the user to review and edit before sending. Uses
ACTION_VIEWintent to provide a safer, user-controlled sending experience.Implementation Details
Both actions prompt the user to configure:
The actions are:
SEND_SMSAndroid permission with proper request flowTechnical Changes
Core Components:
SendSmsandComposeSmsdata classes directly toActionData(no parent sealed class)sendSms()andcomposeSms()methods inPhoneAdapter/AndroidPhoneAdapterSmsActionBottomSheetfor SMS configuration UI following the pattern of other action bottom sheetsPerformActionsUseCaseDatabase:
SEND_SMSandCOMPOSE_SMSentity types toActionEntityEXTRA_SMS_MESSAGEconstant for message persistenceActionDataEntityMapperPermissions:
SEND_SMSpermission to the permission systemAndroidManifest.xmlUI/UX:
SmsActionBottomSheetwith Material Design components for a unified configuration experienceic_outline_message_24.xml)Error Handling:
NoAppToSendSmserror type for cases where no SMS app is availableTesting
While the implementation follows all established patterns in the codebase, testing should verify:
Files Changed
All changes follow existing code patterns and maintain backward compatibility.
Fixes #727
Original prompt
Fixes #727
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.