I've ordered the Android Dev Phone yesterday, and began development for an Android solution that will solve the problem I'm currently having with my phone, a Philips 768 phone, which had been with me since 2005 or 2006 Dec.
So, for quite some time (since m5), I've been following the releases of the Android SDK, and recently I downloaded 1.0r2.
And after trying to figure out for nearly 2 days, together with the help of the Android source, I've figured out how to list all the SMS texts.
Here's the main gist:
String readSMS() { String LResult; StringBuffer LSB = new StringBuffer(); Cursor LManagedCursor = managedQuery(LUriSms, projection, null, null, ""); if (LManagedCursor.moveToFirst()) { do {// ... String LBody = LManagedCursor.getString(bodyColumn); LSB.append(" Message: "+LBody+"\n"); } while (LManagedCursor.moveToNext()); } LResult = LSB.toString(); return LResult;}
Having been a Delphi developer for many years, some of my Delphi practices and coding conventions have found their way into this Android code.
In 2017, with the release of Delphi 10.2 Tokyo, Embarcadero introduced a specialized implementation of the Observer pattern into the System.Classes unit. While it has been in the wild for 9 years, it remains a "hidden" architecture for many, primarily because it serves as the invisible engine behind LiveBindings. Other than live bindings, you can also use the Observer pattern as a way to update component settings to the Windows registry, an .ini file, or persist it elsewhere.
System.Classes