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

AndroidAppmethodCode SnippetDelphiFiremonkey

Access External Storage With These Helper Functions For Delphi XE7 Firemonkey On Android

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE7 Firemonkey External Storage Helper Functions Android | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSDeveloper Ray Vecchio has released some helper functions which makes accessing the external storage on Android in Delphi XE7 Firemonkey a bit easier. The unit is called Androidapi.IOUtilsEx.pas but it also comes with Androidapi.JNI.EnvIntf.pas and Androidapi.JNI.SystemIntf.pas. As you may know most Android devices usually have an internal storage and then an external removable storage (like a microSD card). Some of the functions available in the helper library are GetExternalStorageState, isExternalStorageWritable, isExternalStorageReadable, isExternalStorageEmulated, isExternalStorageRemovable, and getStorageState() for finding out the state of the external storage. It also has some functions for getting directory locations like GetExternalStorageDirectory, GetDataDirectory, GetDownloadCacheDirectory, and GetRootDirectory. Apparently the most robust way to get access to the external storage location is through these two functions GetSysSecondaryStorage and GetSysExternalStorage. This helper unit should also work in Appmethod.

Head over and download the full helper unit for accessing external storage on Android in Delphi XE7 Firemonkey.

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

Related posts

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging


Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply