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.
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.