How can I run code when my application is installed/upgraded?

by Josh » Thu, 16 Apr 2009 07:53:04 GMT


Sponsored Links
 I have an application which has notifications that disappear when the
application is closed to be reinstalled or upgraded.

How can I have my application either run code when it is first
installed or have it detect the first time it is run?

--~--~---------~--~----~------------~-------~--~----~



How can I run code when my application is installed/upgraded?

by Justin (Google Employee) » Thu, 16 Apr 2009 08:37:31 GMT


 Simply write data to the disk, perhaps the version number of the last
time the application ran. Then check this number at startup.

Cheers,
Justin
Android Team @ Google



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Android browser is parsing my XML (KML) document

Hey Guys-

Is there any way to display raw XML in an Android Browser. My XML file
is being stripped of all the XML tags, and I need them for my map
application to work correctly.

Please advise,

Raul

-- 

2. I can't find \data\misc\location folder!!

Hi,

I'm a begginer and I need some help with this before ask about other
problems in my application..First of all:

---> Why I don't have -->misc<-- folder and -->location<-- folder in
my devices?? I've changed the root path during installation but I
don't think it should be a problem...

I'm trying to develop a GPS app on Windows XP with Eclipse. While I'm
debbuging my code, I get the message that gps LocationProvider doesn't
exist....And I guess it's true...

any idea?? I've tried to reinstall but the problems still be there...

thanks a lot.

--

3. Nested LinearLayouts aren't inflating as expected.

4. Bistro Bot

5. Setting permissions on radio (chmod /dev/ttyUSB1) in init.rc

6. How to include widgets in an existing android application

7. Using ADT plugin in Eclipse