Search code examples
androidgoogle-playandroid-launcherandroid-wallpaper

One launcher icon for multiple Live Wallpapers


I'm currently working on the rollout process of my upcoming live wallpapers.

I currently have one live wallpaper in the Google Play store that comes with no launcher whatsoever. The settings can only be adjusted in the native live wallpaper settings.

For the future I am planning to create an additional "app" (that needs to be shown in the Android menu and is also separately listed in the Google Play Store) that can access the settings of my live wallpaper (in case they are installed). So the user can access the settings of all my live wallpapers in one place. Lets call this app "Wallpapers Hub"

Here's the problem I am having:

If say a user downloads LiveWallpaper1, the live wallpaper would automatically create a icon in the menu. (Wallpapers Hub)

Now lets say the same user downloads LiveWallpaper2, which would also contain the launcher. He would now see two icons in his menu, opening the same app which is of course not what I want to achieve.

<activity
    android:name="?????">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

How could I achieve that all my live wallpapers use the same launcher icon?


Solution

  • I'd suggest the following design: You've got the following apps:

    • HUB = wallpaper hub
    • WP1 = live wallpaper1
    • WP2 = live wallpaper2
    • ...

    WP1, WP2 etc shouldn't have any launcher icon (as you don't want them launched). But give them a android:settingsActivity=" in their manifest.

    Have this settings activity

    • look to see if the HUB is installed (by sending a broadcast using inter app communication)
    • if it is installed, start the settings app (using an intent)
    • if it isn't installed, display a page saying "To alter the settings for this wallpaper you need the HUB app" and give a deep link to the HUB app in the Google Play store.
    • the HUB app has a launcher entry

    Then if the user only has WP1 installed they get prompted to install the HUB, and there is only one launcher icon (for the HUB)