Home Screen Widget Configuration Issue

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Home Screen Widget Configuration Issue

Postby mbaird » Sat Aug 29, 2009 12:30 am

I have written a home screen widget that pops up a configuration window as you add it to your home screen. I'm doing this via the android:configure attribute in the <appwidget-provider> tag. After the user enters their configuration values in the configuration activity I call the activity's finish() method and the device goes back to the home screen, with the new widget now in place.

The problem I'm getting, is if the user reorients the phone from portrait->landscape or landscape->portrait during the configuration activity, such as when they open the keyboard on a G1 to type some value into a text field on the configuration screen, then the home screen widget does not get displayed on the home screen.

I wish I could give more details about what is happening, but I don't see anything unusual in the logs when this happens. My app even goes on to log some things as if it's still running and attempting to display the home screen widget. The widget just isn't displayed on the home screen if the phone's orientation was changed while the configuration activity was active.

Any help would be GREATLY appreciated.
mbaird
Freshman
Freshman
 
Posts: 4
Joined: Sat Aug 29, 2009 12:18 am

Top

Postby mbaird » Sat Aug 29, 2009 4:23 am

To see what I'm talking about, you can run the app in this article (there's a link to the source in there) http://www.developer.com/ws/article.php/3833306 It has the same problem I'm talking about.
mbaird
Freshman
Freshman
 
Posts: 4
Joined: Sat Aug 29, 2009 12:18 am

Postby nabil » Sun Aug 30, 2009 12:00 pm

Hi,

can you post your code (or just the widget part+ configuration activity) ?

Nabil.
nabil
Freshman
Freshman
 
Posts: 3
Joined: Wed Aug 26, 2009 3:16 pm

Postby padde » Sun Aug 30, 2009 1:11 pm

It is a known bug among others.. i think the next android update will fix those widgets bugs.

http://blog.elsdoerfer.name/2009/06/03/writing-an-android-widget-what-the-docs-dont-tell-you/

Here is the site i read it and it provides hints and code snippets to workaround the bugs.
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 2 guests