Android 5 Lollipop Bitmap Workaround For Delphi XE7 Firemonkey On Android

Delphi XE7 Firemonkey Android 5 Lollipop Bitmap Problem ErrorDeveloper Andrea Magni from Italy has a blog post up that highlights an issue with Android 5 and provides a workaround for Delphi XE5 Firemonkey. At the moment the roll out of Android 5 is pretty limited but that is sure to change in the future. The issue is that something changed in Android 5 (Lollipop) having to do with 3D surfaces and bitmaps. This has caused an issue with third party tools like Delphi and Adobe AIR. Platform vendors like Google, Apple, and Facebook regularly make breaking changes to their platforms so you have to upgrade your apps regularly if you want to stay current. The issue in Delphi XE7 is that it is unable to load bitmaps that are stored in the form using it’s LoadFromStream function. The workaround is to just store and load your bitmaps from the file system with LoadFromFile. Andrea Magni has provided some code which will automatically save out all the bitmaps on your form to files and then load them all back up again on Android. You do have to manually remove the bitmaps from your form once you save them out for now however. This same workaround also applies to Appmethod.

Head over and check out the full blog post about the Android 5 Bitmap workaround for Delphi XE7 Firemonkey before downloading the source code.

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

3 Responses to Android 5 Lollipop Bitmap Workaround For Delphi XE7 Firemonkey On Android

  1. Antoine says:

    does not work if you use styles !

  2. Chester Wilson says:

    I have tried removing the .BMPs from the images, putting them in the resource file and writing them out to the disc. They get there, and are visible via explorer, but using LoadFromFile fails.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Launch Android Intent File Dialog And Get The Result In Delphi XE7 Firemonkey On Android

There is a post up on a blog called Blue Christmas that demonstrates how to use a third party JAR,...