Search code examples
androidpackageshortcutlauncher

How to group android shortcuts inside a "folder"programatically in an android custom launcher application?


I'm developing a custom launcher application and I'd like to group some apps inside a folder like the default launcher behavior of Android. I couldn't find some API to create this "folder" programatically.

I already tried to define the OnItemLongClick behavior but only this is not possible to group the icons.


Solution

  • like the default launcher behavior of Android

    There is no "default launcher" for Android. Across the tens of thousands of Android device models, there are several dozen pre-installed launcher implementations.

    I couldn't find some API to create this "folder" programatically.

    That is not a feature of the operating system. You will need to store this information yourself in some sort of file managed by your app.