android - how to get updated app hosted in localhost -


in project suppose host inventory.apk in localhost of network. app periodically checks whether new version inventory.apk uploaded. if new version of inventory.apk found, want ask clients of company update old version of inventory.apk in device. suggestion appreciated.

thanks

first of all, in opinion easiest way check new .apk files name .apk files dates. example: 27_11_2014.apk .

if follow path, can name/names of apk files in directory kind of code:

urlconnection conn = new url(url).openconnection(); inputstream in = conn.getinputstream(); 

you can use sharedpreferences keep first initialization date , compare parsed .apk file name. if file name has newer date can prompt dialog warn user update.

there 1 thing cannot achieve without root permission, , automatically updating app itself. not sure if aiming kind of usage wanted warn you, apps cannot update without root permission.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -