Search code examples
androidconfigurationwidgetlauncher

How to add widget configuration activity to launcher?


I have a widget with a configuration activity.

Currently the configuration launches when you click on the widget.

I want to add the configuration as an app icon to the launcher.

The problem is that when the configuration launches on click, I get a specific widget id , so each widget instance can have a different configuration.

What will happen if I start the activity from the launcher?

I wont be able to show multiple configurations on the same activity.

Thanks.


Solution

  • What will happen if I start the activity from the launcher? I wont be able to show multiple configurations on the same activity.

    Correct. Your choices appear to be:

    1. Display a list of app widgets -- perhaps you have a database table matching up app widget instance ID to some sort of display name
    2. You don't have the activity in the launcher. For example, put a configuration icon in the app widget itself.