How to show a Splash/info screen AFTER a Market Update?

Cableguy

Expert
Licensed User
Longtime User
I have an app in my phone, Go Launcher EX, wich, everytime it gets Market Updated, and I Run the app, I get a Splash alike info screen with the new features/bug fixes...
How can we implement this? Is there a way to check when our app was last updated?
Or do we have to "hardcode" it?
 

timo

Active Member
Licensed User
Longtime User
I think you can solve by implementig it with your own Mysql server online that receives the imei from everyone who launces the app. All must be coded before distribuiting. I don't see other ways. But I don't know if it is fair.
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
No need for a MySQL DB, a simple text holding the new version number will suffice, then compare the version on your phone against the one online will do the trick, I wrote an app that has that feature.

You will have to manually change the version number on your server though.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I see another way, but it implies the need to NOT FORGET to change a hard coded variable, with the "updated" version number, and compare it to a var in a file...
But I was just wondering if it was possible to jus get the last update date from the installed apps list... This way I wouldt need to remember to set he hardcoded variable...

[EDIT] NJDude, You just beat me by a second there,.... just about thesame Idea, but no need for the server..
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
From my understanding, an update keeps the previous userfiles, so I can have a single line text file with the last installed versions, and check against it with my Hardcoded vriable...that I have to remember to change with every update...:eek:
 
Upvote 0

manios

Active Member
Licensed User
Longtime User
Just check the version against an user file version.txt with the version number. If there is a difference show the data. After confirmation by the user rewrite the version.txt with the new version.
If the program version is the same as the version.txt just do nothing. No need to make any artificial version number, as program version number is changed anyway. Just change the text to display.
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
Ok, I see, I thought you meant that when you open the app, if an update was available prompt the user to download, which is what I did on my app.

Yes, I think what you are suggesting might work.
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
I think this trick may work.
- Include file newupdate1.txt (newupdate2.txt for version 2.0, newupdate3.txt for version 3.0...) in apk file.
- When your app starts first time, check for file newupdate1.txt in File.DirInternal.
1. If it not existed then copy newupdate1.txt from File.DirAssets to File.DirInternal and show its content.
2. If it existed then skip it.

That's all :D
 
Last edited:
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I think this trick may work.
- Include file newupdate.txt in apk file.
- When your app starts first time, check for file newupdate.txt in File.DirInternal.
1. If it not existed then copy newupdate.txt from File.DirAssets to File.DirInternal and show its content.
2. If it existed then skip it.

That's all :D

But them, after the first update, every time I runned the app the splash would show because the file would be there...
 
Upvote 0

manios

Active Member
Licensed User
Longtime User
Delete the .txt file after showing it will do the trick!
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I am not sure that is possible...
In B4Ppc the file got blocked after first use ( any file ), and was only released after appclose...
I hope Android works diferently...
 
Last edited:
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
But them, after the first update, every time I runned the app the splash would show because the file would be there...

I don't think so. We check if file existed in File.DirInternal (not File.DirAssets) then we skip splash screen.

BTW, you can't delete files in File.DirAssets but you CAN delete files in File.DirInternal :)
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I don't think so. We check if file existed in File.DirInternal (not File.DirAssets) then we skip splash screen.

BTW, you can't delete files in File.DirAssets but you CAN delete files in File.DirInternal :)

The problem is not if it is possible to delete a file, but to delete it AFTER it being used by the app... Will Android SO release the file automatically?
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
Sure, you can delete files that created/copied by your app.

You can test it manually:
- From Home screen. Select menu Settings / Applications / Manage Applications. Select your app then select "Clear data" button. It will delete all data/option/ini... file of this app (if existed).
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I will try that aproach, as it is simpler to code, and I dont have to remember in what version left my app..
I will later post how it went..
 
Upvote 0

timo

Active Member
Licensed User
Longtime User
Anyway, If I've understood right your posts, I don't think it will work without web connection. If a user buy your app, run it for ten years and never looks for availables updates(never connects), how can his app know that in the meanwhile you just updates 3 times that app?
In fact, it's up to you (author) to look for 'old' users with old versions: this can only be made with connection between user and your server every time the app is in use.
Am I wrong?
 
Upvote 0

Brad

Active Member
Licensed User
Longtime User
No need for web access. When the app is updated, the contents of DirAssets are replaced with the new version but any files located in DirInternal are not touched. Simple solution is to have a version.txt file in both locations with a single line holding the version number. perform a simple file.readstring on both and compare.
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
Anyway, If I've understood right your posts, I don't think it will work without web connection. If a user buy your app, run it for ten years and never looks for availables updates(never connects), how can his app know that in the meanwhile you just updates 3 times that app?
In fact, it's up to you (author) to look for 'old' users with old versions: this can only be made with connection between user and your server every time the app is in use.
Am I wrong?

Please read first post again, Cabguy said the app was updated from Market. Market app will check new version of all installed apps and announce on notification bar.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
@ Susu :

I do think you misunderstood me...
I dnt need to compare the instaled version withe the one available in the market, all I need is to know that the app was in fact updated, so the aproach here sugested, of placing a text file withthe version, works like a charm...
All I need is to hard code the "update version" variable in my code, before I release the update to Market...Then, when first run AFTER market update, the hardcoded value is compared with the one in the dir.internal text file...
I dont even need to know if it's bigger or smaller, just that it is diferent...
I have already implemented this in my current project, and will be app to post the snipets if someone is interested, but it realy is as simple as comparing two values...
 
Upvote 0
Top