Re: [android-developers] Android application upgrade scenario

2010-08-26 Thread { Devdroid }
On 25 August 2010 08:22, Android Developer core.test.accou...@gmail.com wrote:
 I have a pre-installed application on device, when user upgrades
 application on pre-installed application, i want to show alert
 something similar change log when user opens the application. In pre-
 installed application, it's not  storing any version specific
 information.Is there any way to recognize user is upgraded from the
 pre-installed application?

Why do you even need to bother what version user upgraded from? The
simpliest approach could
be i.e. to store in app preferences app versionCode. On launch, check
if that prefs value exists.
if it does, check if value is lower than your versionCode, if it is,
user upgraded = show changelog.
If there's no prefs entry = show changelog as it is definitely old
code which did not store
such entry. Afterall store current versionCode so on next launch you
won't show changelog
as versionCodes would be equal.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android application upgrade scenario

2010-08-25 Thread Android Developer
I have a pre-installed application on device, when user upgrades
application on pre-installed application, i want to show alert
something similar change log when user opens the application. In pre-
installed application, it's not  storing any version specific
information.Is there any way to recognize user is upgraded from the
pre-installed application?

I registered for PACKAGE_ADDED, PACKAGE_REMOVED and PACKAGE_REPLACED
intents. I am able to receive those intents when i try read the
version name it's not able read the version name when application is
removed. Any suggestions please?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en