*> Does "replace" equal "uninstalled"?  If so, then maybe I don't need to
worry about any of this.*

I certainly hope so... otherwise Android would have all sorts of problems
when updating apps.

On Thu, Mar 3, 2011 at 10:10 AM, Jake Colman <[email protected]> wrote:

> >>>>> "JA" == Justin Anderson <[email protected]> writes:
>
>   >> Let's say v1.0 was implemented using a broadcast receiver (which
>   >> is the appwidget itself) and two services.  I then publish v1.1
>   >> which fixes bugs in all the components.  The user updates my
>   >> appwidget via the Market while the appwidget is still
>   >> running. When/how doe that new code start executing?
>
>    JA> I believe the next time the provider is called, but I may be
>   JA> wrong.
>
> Ah, but that's the key question!  :-)
>
>   >> Now I publish v1.2 which restructures the code so that it uses one
>   >> service instead of two.  How/will the redundant service be
>   >> removed?  Will it just wither and die?  Do I need to worry about
>   >> this?
>
>    JA> It will be removed when the application is uninstalled.
>
> Does "replace" equal "uninstalled"?  If so, then maybe I don't need to
> worry about any of this.
>
>   JA> On Thu, Mar 3, 2011 at 8:21 AM, TreKing <[email protected]>
> wrote:
>
>   >> On Wed, Mar 2, 2011 at 10:51 PM, Justin Anderson
>   >> <[email protected]>wrote:
>   >>
>   >>> *> How can a package determine that it has been updated and that it,
>   >>> > therefore, must stop and restart itself?*
>   >>>
>   >>> According to this, you can't:
>   >>>
> http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED
>   >>>
>   >>
>   >> Try this one:
>   >>
>   >>
> http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REPLACED
>    >> <
> http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REPLACED
> >
>
> Assuming this works, and I'll run some tests shortly, what can/should
> the widget do to make sure that it only executes the new code?
>
> --
> Jake Colman -- Android Tinkerer
>
> --
> 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
>

-- 
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

Reply via email to