8

After updating my app sometimes all old widgets disappear from home screen. And in app launcher/widget chooser my three widgets appear twice - until reboot!

Any suggestions?

Simon Dorociak
  • 33,374
  • 10
  • 68
  • 106
almisoft
  • 2,153
  • 2
  • 25
  • 33
  • My app users reported the same problem [Widget disappears after app update]. However, I cannot reproduce myself. (Two reports happened to be Samsung devices: Note 3 and S4). On which devices can you reproduce? – jclova Apr 18 '14 at 11:54
  • These users reported the bug: Note 3 with 4.4.2, S4 with 4.4.2. It seemes that Android 4.4.2 has bugs. Because users reported me other problems with my widgets, too. – almisoft Apr 19 '14 at 10:18
  • My users reported exactly same problem. Devices: Galaxy S3, S4, Note3. Has anybody any news about this issue - error in code or bug in Android? – dvpublic May 30 '14 at 01:34
  • Probably this is a bug in Touchwiz launcher on 4.4.2, see report of Beautiful Widgets authors: http://levelupstudio.com/en/blog-en/widgets-disappearing-with-samsung-4-4-2-roms – dvpublic May 30 '14 at 08:44
  • Today I have received first report about the issue from user with non-Samsung device - HTC eve one (m8). So, I am not sure about Touchwiz launcher. – dvpublic Jun 08 '14 at 08:34
  • This is an OS bug, started in 4.4.x and still present in Lollipop. While developping on a Nexus 5/6, I update the app very frequently and I have seen widgets (and even shortcuts) disappear from time to time even on the Nexus 5 running 5.0.1 with stock launcher! It doesn't seem to affect third party launcher though. It only affects paid apps because they are installed on secure storage, however when I update my apps they are installed on internal non-secure storage, but the issue shows up from time to time. – 3c71 Feb 08 '15 at 07:13
  • Anyone found a workaround/solution since? – 3c71 Sep 13 '15 at 12:15

5 Answers5

1

On this page there is a long article talking about this issue.

The core of the issue seems to be this:

It is important that we use our own keys with the widget update action, if we use AppWidgetManager.EXTRA_WIDGET_IDS we will not only break our own widget, but others as well.

Unfortunately my code is not affected by this issue but I still have users reporting the issue. Also found this report

BrainCrash
  • 12,992
  • 3
  • 32
  • 38
  • Tried to replae all 'AppWidgetManager.EXTRA_WIDGET_ID' with my own EXTRA_ID. This does no help. Problem on Samsung launchers.... – RusArtM Dec 05 '14 at 06:44
  • The link explaining the mysterious case and explaining not to use EXTRA_WIDGET_IDS is about a very different problem, it explains "The widget was there, you could long press and move it, but it wouldn’t display anything". I believe OP is about the widget being entirely removed from the launcher on every (paid) app update. – 3c71 Feb 08 '15 at 07:16
0

My widgets disappeared after upgrading S4 to android lollipop. Discovered by accident that if you double tap the left soft key there is a widget icon at the bottom of the screen. Tap the icon to open widgets and there they all are!

Gaynor
  • 1
0

This is an OS bug, because of the way it updates apps, making them unavailable for quite some time. If a launcher is updating the widgets during that time, it will likely dismiss them, except if it implements a specific workaround to avoid this situation.

Please stare at the issue here so that (maybe) Google considers fixing it: https://code.google.com/p/android/issues/detail?id=188137

3c71
  • 4,313
  • 31
  • 43
0

if you change exact package path for a widget that'll break the upgrade and widget will disappear on upgrade

2cupsOfTech
  • 5,953
  • 4
  • 34
  • 57
0

This question give us a solution.

We were implementing Xamarin.Android project using MvvmCross. This project uses widgets, and on app update the widget disappeared. The question mentioned in the link give us a path to find the solution, We used APK-Analyzer to analyze the difference between old and new APKs, and by looking into AndroidManifiest.xml files we figured out that the used AppWidgetProvider has a different package name. By searching more we found a release note from Microsoft which says:

The names for generated Java types are different in this release. Any project that explicitly uses one of the old names that starts with md5 will need to be updated by hand to account for this change. See Breaking change for generated Java type names below for more details.

And by defining a constant name by replacing the following from:

[BroadcastReceiver(Label = "Widget Title")]
public class CustomProvider : AppWidgetProvider

to

[BroadcastReceiver(Label = "Widget Title", Name = "<old package name>.CustomProvider")]
public class CustomProvider : AppWidgetProvider

the problem solved.

Mohammad Sayed
  • 146
  • 1
  • 8