I want to customise my phone to forward SMS messages automatically


Question

My goal is that I want to customise my own Android phone to automatically forward text messages from user defined phone numbers onto other user defined phone numbers. I tried updating a very simple app to do this:


https://github.com/EnixCoda/SMS-Forward


However I found that once I had updated to newer Android versions, the app started up and allowed me to set a forwarding number, but did not actually forward the SMS (I used my phone in USB debugger mode). The SMSReceiver class did not get the message that an SMS had arrived I found when I debugged it. I read more, and it seems that only the default SMS app is allowed to have anything to do with text messages. So now, I want to start from the source code of the stock/default SMS app that comes with Android so that I can add the features I am interested in to it.


I'm open to different approaches, but I don't want to download a crapware app with ads or pay nagging.


Doing a little more research, I found that Signal can handle SMS messages, but it seems like quite a big and complicated app.


Any advice appreciated!


Answer

You can try to create the following flow with Automate and test if it accomplishes it.



  1. Create a new flow by pressing on the + button

  2. Press again on the + button, search for SMS. Select "SMS received" block

  3. Press the "SMS received" block. Enter the phone number of the sender. Click on "Subscription ID" and select your SIM card (Network provider). On the Message box, enter the name of a variable, for example msg. Click on Save.

  4. Press the + button. Select the "SMS send" block. Press it. Enter the phone of the contact you want the SMS to. Set the Sim card (network provider) under "Subscription Id". on the Message box, press on fx to enable it, then enter the variable create during step 3. In this case, enter msg. Click on Save

  5. Link the blocks as seen on the first image below, then press back.

  6. Give the flow a name and enable "send and view messages". Give the requested permission, then press Start.


When an SMS is received from the sender whose number you entered on step 3, it will be immediately sent to the contact number entered in step 4. The log on the second image shows that an SMS was received then sent (forwarded).


Note: You should be able to add more number during step 3 and 4 by enabling fx. But I have not tested it. Or, you can add more SMS received and SMS send blocks in parallel for each number.


Disclaimer: I am just a user of the app.


IMG:
IMG:


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes