In the following example, the activity responds by calling addAppWidget() to add the app widget: public final class Launcher extends Activity implements View.
developer.android.com