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

AndroidAppmethodCode SnippetDelphiDemoFiremonkey

Install Shortcuts On The Android Home Screen With Delphi XE5 Firemonkey

Delphi XE5 Firemonkey Android ShortcutIf you are building a professional Android application with Delphi XE5 Firemonkey one thing you will want to do is create a shortcut on the Android homescreen so users can find your app after the first launch. Here is some sample code that allows you to do that using some calls to the Android SDK API. If you want to see the Java code for Android which does the same thing you can check out this and this. Keep in mind that in order for this code to work you will need to have the INSTALL_SHORTCUT permission set.

Here is the sample code but keep in mind you will need to customize the StringToJString(‘com.embarcadero.HeaderFooterApplication’) section to match the ID of your own application.

When you application is uninstalled I believe it will remove the shortcuts from the homescreen that point to it so you don’t have to worry about cleaning them out. However, there is also an UNINSTALL_SHORTCUT permission and you can remove shortcuts that your app has created as well.

And finally you can download a full demo application which creates a shortcut.


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

Related posts

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


Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores


DelphiCon 2020 FireMonkey Sessions Available Starting November 19


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

Sign up for our Newsletter and
stay informed

Leave a Reply