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.

Install Shortcuts On The Android Home Screen With Delphi XE5 Firemonkey by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

9 Responses to Install Shortcuts On The Android Home Screen With Delphi XE5 Firemonkey

  1. Pingback: Ten Tips For Creating Professional Android Apps With Delphi XE5 Firemonkey | Delphi XE5 Firemonkey, Delphi Android, Delphi IOS

  2. Brian Hamilton says:

    hey,, it works 🙂
    (make sure to put into the onactivate and not oncreate if you want to do this auto (e.g if checking if not been done already from a settings file or similar)

  3. Perry Jacobs says:

    It works but it creates a new shortcut each time it runs. How do you check if the shortcut is already there so it is only created once?

  4. Pingback: Ten Tips For Creating Professional Android Apps With Firemonkey | Firemonkey X

  5. Pingback: Ten Tips For Building Stunning Professional Android Apps With Delphi XE7 Firemonkey | Delphi XE5 XE6 XE7 Firemonkey, Delphi Android, Delphi IOS

  6. Pingback: Create homescreen shortcut on Android with Delphi XE7 | 我爱源码网

  7. Pingback: Ten Tips For Building Professional Multi Platform Enterprise Apps With Delphi XE8 Firemonkey | Delphi XE5 XE6 XE7 XE8 Firemonkey, Delphi Android, Delphi IOS

  8. Pingback: Ten Tips For Building Professional Multi Platform Enterprise Apps With Firemonkey | Firemonkey eXplore

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE5 Firemonkey JSON CSV
JSON And CSV Components For Delphi XE5 Firemonkey On Android And IOS

Winsoft has a group of components which read and write JSON and CSV files under Android and IOS (in addition...

Close