Read SMS Messages With The JNI API In Delphi XE6 Firemonkey on Android

Delphi XE6 Firemonkey Read SMS AndroidDeveloper Andrey Yefimov has a blog post up where he demonstrates how to read a list of SMS messages into Delphi XE6 Firemonkey using the Android API. We’ve covered reading and writing SMS messages on Android before a few months ago. Andrey explains that you need to add the Read SMS permission to your Android manifest for in order for your app to read SMS messages. He also explains that SMS messages are stored in directories on your Android device using local databases. There is sample code where he shows how to find and read these files using the Android SDK and the Delphi Firemonkey JNI. The demo app includes a list of URIs (like content://sms) to the location of the SMS messages and the source code resolves the URI to the actual location. The code then loops through the location using a JCursor object and read each item like so:Ā JStringToString(cursor.getString(
cursor.getColumnIndex(StringToJString(‘ADDRESS’)))); I think you can see a list of all of the columns in this Object Pascal Android interface file:

Andrey’s blog is in Russian but you should be able to use Google Chrome to translate it to your language.
Head over and check out the full blog post for yourself about how to read SMS messages with Delphi XE6 Firemonkey.

OrĀ download a mirror of the Read SMS demo for Delphi XE6 Firemonkey

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Read SMS Messages With The JNI API In Delphi XE6 Firemonkey on Android by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE6 Firemonkey Android Speech Recognition & Text To Speech
Build Speech Recognition And Text To Speech Into Your Delphi XE6 Firemonkey Apps On Android

Jim McKeeth has a blog post up with two JNI wrapper components which wrap the Android Speech Recognition and Text...