How do I bookmark the sms: scheme?


Question

I use a local town public transport service and it also offers an SMS ticket service that I find pretty easy to use. One thing I dislike about it is remembering every single code for particular routes (the codes are simple unless I'm on the street). I would like to bookmark it somehow and register in my (web browser?) bookmarks or my contacts. RFC 5724 suggests a special SMS URI that generally is:


sms:$SERVICE_PHONE_NUMBER?body=$TICKET_REQUEST_CODE

e.g., sms:1234?body=5678 in my case. I was trying to add such a bookmark in Google Chrome hoping to add a bookmark widget to the home screen, but Chrome interprets it as an HTTP URI trying to open a web site. I was also trying to add the bookmark to Google Contacts as a special "web site" field for the dedicated contact, but it didn't work either as if it were an HTTP URI.


My question is, is it possible to bookmark an sms: scheme URL on Android so I could use predefined SMS messages with predefined recipients and predefined text bodies?


If it's worth noting, I use QKSMS. It seems to declare sms and other protocols intent filtering, but for whatever reason it does not work for me.




Edit 1.


As a test workaround I've just created a simple HTML page, and it seems to work:


<a href="sms:1234?body=5678">5678</a>

Saving the page to the device and adding a shortcut to the file on the home screen seems to do what I want very and very closely, and clicking the link opens QKSMS with proper recipient and text body. I only don't really like the idea of having a static HTML file on my device because it may be hard to maintain in case of necessity. So it turns out that Google products do not work well here?


Answer

On Android the communication between the web browser and the sms app bases on "Intents".


based on your description the problematic component in this set-up is the web browser.
Hence using a different app that can send Intents to other apps or using the adb shell can be helpful for testing out SMS links directly.


There a a lot of apps in Google PlayStore that can send Intents to other apps, for example Intent.


If you want to try adb (Android Debug Bridge) use the following command to sens an sms intent:


adb shell am start -a android.intent.action.VIEW -d sms:1234?body=5678

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