How can I place app icon on launcher home screen?

前端 未结 6 1495
迷失自我
迷失自我 2020-12-02 17:47

As you know, when app is nomally installed, icon is created at launcher menu screen. What I want to do is create icon at user home screen during installation. (without press

6条回答
  •  清歌不尽
    2020-12-02 18:23

    You could make a setup function that the user can use to do all potential actions. For example, make any necessary user-accessible folders(if they don't exist already), adding the shortcut to the home screen, and/or loading in initial data.

    This is a function I'm actually writing now, so hopefully it turns out well. But yeah the point is to keep it out of the onCreate() so it doesn't get called every single time!

提交回复
热议问题