Thank you. Sigh, this sort of change is so very, very irritating.
Who makes these decisions? Why change working behaviour? This is the sort of code bomb drop nonsense that is making it so very hard for Android developers to make robust software. No cogent explanation as the 'why' of this decision in the release note you linked to. I don't own a 3.x or 4.x device and the 3.x emulator sucks, I can't get it to run on my modest laptop, so I have trouble even testing on the later platforms. I don't want my user to access functionality from the launcher at all, I want them to only access functionality from the Widget. All my Launcher Activity does is display a splash screen telling the user how to install the Widget. What was wrong with the old behaviour? Why not allow an installed application with a Widget be installed as Widget without Launching an Activity first? It makes no sense to me. In fact, aside from that mention you linked to of an Application's state as stopped or started, there seems to be no real explanation of this behaviour at the Application level anywhere in the developer documentation. How are we supposed to know and understand this sort of undocumented behaviour? Anyway, thanks for the info. On Feb 4, 7:40 pm, Kostya Vasilyev <[email protected]> wrote: > Yes, this changed starting with 3.1: > > http://developer.android.com/sdk/android-3.1.html#launchcontrols > > The end result is: > > App widget can't be added to the home screen immediately after the > installation. > > The application's package needs to be moved from stopped to started state > first. > > You can do this by providing an activity that the user can launch from > Launcher. > > This is not the same as the widget config activity. > > -- Kostya > > 4 февраля 2012 г. 5:30 пользователь David Ross > <[email protected]>написал: > > > > > > > > > But that's not how it works in 2.3.x. > > > Install the "App (Widget)", say from market. Don't run it when given > > the "Open" option in the market after download completes. Don't launch > > it from the Launcher either. Just navigate back to the Home Screen. > > > Long press on home screen and select Widgets. Hey presto, it's there! > > No need to "launch" the App for it to be available as a Widget. The > > Android install process parses the manifest and places the new widget > > in the list of available Widgets without having to be "launched" > > first. > > > And while you need to have the configuration Activity in the manifest > > and the widget config file, that Activity does not have to do anything > > at all really, you can just return RESULT_OKAY and handle the widget > > configuration in your WidgetProvider onEnabled() and onUpdate() when > > you get the APPWIDGET_xxx Intents. Has that changed in 3.0+? Am I > > missing something here? > > > As I said before, this approach handles the bad use-cases that Android > > does not handle cleanly. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

