Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiDemoFiremonkey

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.

Related posts
DelphiFiremonkeyIDEIOSOSXWindows

DelphiCon 2020 FireMonkey Sessions Available Starting November 19

AndroidC++BuilderDelphiDemoFiremonkeyWindows

Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

Sign up for our Newsletter and
stay informed

Leave a Reply