android - Re-instantiate Home Screen Widget when App is Upgraded -


i have following problem: when app upgraded, active home screen widget goes dead. returns original xml layout before onupdate() ever called, , no longer receives broadcasts.

none of overridden methods ever called (ondeleted(), onenabled(), ondisabled(), or onappwidgetoptionschanged()).

i have managed reinitialize widget once app opened, , leave default text of widget "re-install widget" inform user.

however, there important use case left out, specifically, when user doesn't open app after installing, wants use widget (see diagram).

does know way detect when widget dies programmatically, without opening app?

i know running widget code old apk, fact widget doesn't die app installed, , layout reverts when home screen navigated tells me there should way "get in middle of that."

also, know widget doesn't die right away because if widget reinitialized before first dies (going home screen), won't have effect. why delayed thread needed reinitialize widget when app closed.

current solution


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -