Android Question Run app for first time vs. update

rafaelmotaquintana

Active Member
Licensed User
I'd like to know how to detect if an application is running for the first time after installation, or is running after an update from google play.
Thanks
 

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
The application can create a file with the current version information.
Then if the application is updated the current version will be greater than information was saved .
 
Upvote 0

Daniel-White

Active Member
Licensed User
Longtime User
If I did not misunderstand you.

It will not be elegant but it will work.

When the APP is downloaded and run the first time in the Phone, the old version an example ver example ver 1. The old version does not make any file or record.

The new code in the new Update example ver 2, can have a code to check if a specific file exist, if the file does not exit then , it is an update in that phone. and you can trigger an event or make another file to save to always trigger an event because it is an updated example ver 2
 
Upvote 0

rafaelmotaquintana

Active Member
Licensed User
But if a client download the application for the first time after that trick, the downloaded app is not the latest version?
Then the trick won't work, because the version he's downloading is the version 2 for the first time
 
Upvote 0
Top