Full Android SDK Interface Files In Object Pascal For Firemonkey

Delphi XE5 XE6 Firemonkey Android SDK Object Pascal APISome APIs in the Android SDK are not fully exposed to Delphi XE5 and XE6 Firemonkey (and AppMethod) by default. The Android SDK needed Object Pascal interface files created to make it easier to access those APIs. There are three different automated solutions available to make this happen. I went ahead and used Java2pas against the entire set of android.jar files for Android 7, Android 8, Android 10, Android 12, Android 14, Android 15, Android 16, Android 17, and Android 19. Java2pas automatically created 3,412 interface files for Android 19 which is Android 4.4 Kitkat. Depending on which Android version you want to target you should use the interface files from that version of Android. I took all of the generated interface files from all of the Android SDK versions and uploaded them to Github. There is everything from android.security.KeyChain to android.speech.tts.TextToSpeech to android.nfc.NfcAdapter to android.opengl.GLES30 to android.os.Vibrator to android.provider.ContactsContract and literally thousands of more interfaces. What is awesome about all of these interfaces is that you can access all of them without having to modify the classes.dex file which you would have to do if this was a third party JAR.

Head over and check out the full set of Android SDK Object Pascal interface files on Github.

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

14 Responses to Full Android SDK Interface Files In Object Pascal For Firemonkey

  1. Oliver says:

    Great work!

  2. Tran says:

    Awesome. Who are you, man? Thank you a LOT!

  3. Magno says:

    Facing a lot of circular references… Need to build a kind of common lib for that. Any other solution? Any way, great job!! 🙂

    • Admin says:

      Yeah Java2pas doesn’t have a solution for that yet. You’ll have to combine the circular reference pas files manually for now.

    • Oliver says:

      If you encounter circular references, you have to merge the “called” files into ther “caller” pascal units and create forward declararations. Java doesn’t care if you use import *, Pascal is always single pass and doesn’t like that.

      I have written a standalone tool which lists circular references for classes generated by java2pas which I eventually will either provide together with it or integrate. It will take a wildcard as parameter and resolve the circular references, merging uses, interface and consts.

  4. Kirk M. Halgren says:

    Just this morning I learned that RAD Studio at the Professional includes the mobile development Add-On pack, which is extra if you buy Delphi XE6 unless you go up to the Architect level. I sometimes use C++ on work related projects, and I love the fact that when I call into C++ code (in a DLL) from Delphi code, I can single step right through the function call in the debugger and see what’s going on in the C code. I once read a book asserting that this is not possible, but the single back end compiler from Embarcadero enables it.

  5. Pingback: Delphi Source Code for Bluetooth Remote Control Car

  6. Arpad Fuzy says:

    I cannot to resolve the circular problems. Can anybody help me?

  7. DeterministicFail says:

    you mentioned the android.nfc.NfcAdapter, but to use it as reader you probarly have to include all files

  8. Pingback: What’s New Roundup For Delphi XE7 Firemonkey On Android, Windows, OSX, And IOS | Delphi XE5 XE6 XE7 Firemonkey, Delphi Android, Delphi IOS

  9. Pingback: Create Android Java JAR Interface Files For Delphi XE7 Firemonkey With Java2OP | Delphi XE5 XE6 XE7 Firemonkey, Delphi Android, Delphi IOS

  10. Pingback: Object Pascal Android Lollipop SDK Interfaces Files For #Delphi XE8 Firemonkey | Delphi XE5 XE6 XE7 XE8 Firemonkey, Delphi Android, Delphi IOS

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Easily Add Advertising To Your Apps With Delphi XE6 Firemonkey On Android And IOS

Marco Cantu from Embarcadero has a blog post up where he shows how simple it is to use the new...