See the App Inventor Extensions document about how to use an App Inventor Extension.
For questions about this extension or bug reports please start a new thread in the App Inventor Extensions forum. Thank you.
For feature requests please contact me by email. To be a sponsor of a new method already is possible starting from only 10 USD! With your contribution you will help the complete App Inventor community. Thank you.
May 31st, 2016: Initial Version released
Aug 11th, 2016: Version 1a: avoid DX execution failed error: build each extension separately
This extension enables you to read all SMS from the inbox, draft and sent folders of the device.
Required permission: android.permission.READ_SMS
Note: This extension uses an undocumented and unsupported content provider, following this solution, which means, this probably will not work on all devices, see also Be Careful With Content Providers.
Read all SMS from inbox, sent and draft folder.
Note: The companion app does not offer the permission READ_SMS. Therefore you have to build the app to be able to use this block.
Event indicating that reading SMS from inbox, sent and draft folder has been finished.
The result will be provided in JSON format. You can convert the result into a list using the JsonTextDecode block from the Web component, see the example app below.
Structure of the result
The following information will be provided for each SMS:
you have to buld the app to be able to use this method!
after reading, you will receive the result in JSON format
after converting the result into a nicer format using address, body and date
Q1: How can I get and display the latest SMS received? I want to have a condition that it will display only the latest SMS that I receieved from a specific number.
A: convert the JSON format into a list of lists, then use a for each item in list loop to check each sms for that specific number, the first sms you find having that number is the sms you are looking for.
Q2: I wanted to perform SMS deletion from the device. Can I achieve this?
A: No, only the default sms app is able to do this, see also this stackoverflow answer.
Developing and maintaining snippets, tutorials and extensions for App Inventor takes a lot of time.
I hope it saved some of your time. If yes, then you might consider to donate a small amount!
or donate some mBTC to Address:
Thank you! Taifun
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.