“Automatic updates” for Java (desktop) application?
Have you looked at the Java Web Start? It checks for updated module on the server and downloads it only if required otherwise things are cached locally on the client PC and starts from there.
Have you looked at the Java Web Start? It checks for updated module on the server and downloads it only if required otherwise things are cached locally on the client PC and starts from there.
In Linux, or any other form of unix, os.execl and friends are a good choice for this — you just need to re-exec sys.executable with the same parameters it was executed with last time (sys.argv, more or less) or any variant thereof if you need to inform your next incarnation that it’s actually a restart. … Read more
Step 1: Add dependency (build.gradle (app)): dependencies { implementation ‘com.google.android.play:core:1.7.3′ … } Step 2: Check for update availability and start if it’s available private AppUpdateManager mAppUpdateManager; private static final int RC_APP_UPDATE = 11; In onStart() method: mAppUpdateManager = AppUpdateManagerFactory.create(this); mAppUpdateManager.registerListener(installStateUpdatedListener); mAppUpdateManager.getAppUpdateInfo().addOnSuccessListener(appUpdateInfo -> { if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE /*AppUpdateType.IMMEDIATE*/)){ try { mAppUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.FLEXIBLE … Read more
SharedPreferences seems like ugly solution to me. It’s much more neat when you use application constructor for such purposes. All you need is to use your own Application class, not default one. public class MyApp extends Application { public MyApp() { // this method fires only once per application start. // getApplicationContext returns null here … Read more
To the best of my knowledge the shortest path for a Windows Scheduled Task to “do something useful in Access VBA” is: Create a Public Function (not Sub) in the database. For example: Option Compare Database Option Explicit Public Function WriteToTable1() Dim cdb As DAO.Database Set cdb = CurrentDb cdb.Execute “INSERT INTO Table1 (textCol) VALUES … Read more
Have spent a long time trying to disable updates (literally hours, reading forums and testing various (some exotic) solutions), and this was driving me crazy. But there what seems an infallible solution (see further down). Even using the official Google page with the templates did NOTHING: https://support.google.com/installer/answer/146164?hl=en I followed scrupulously the instructions of that page, … Read more
To replicate this update behavior you need two things: An updater application which checks for updates regularly. If an update is found it should install it automatically. Most commercial setup authoring tools include good updater applications. You can try writing an updater yourself, but it’s not as easy as it sounds. Per-user installations for each … Read more
ClickOnce has its own security limitations (understandbly so). If you want the full power and control of a Windows application then go with the .NET application updater component. It works like a charm and has even been used by Microsoft internally for their .NET based game (I don’t remember the game name though).
The basic structure of a solution is as follows: There is a main loop responsible for repeatedly loading the latest version of the app (if required) and launching it. The application does its thing, but periodically checks the download URL. If it detects a new version it exits back to the launcher. There are a … Read more
That sounds like a simple webview caching mechanism to me. The following should do what you are looking for: WebView webView = new WebView( context ); webView.getSettings().setAppCacheMaxSize( 5 * 1024 * 1024 ); // 5MB webView.getSettings().setAppCachePath( getApplicationContext().getCacheDir().getAbsolutePath() ); webView.getSettings().setAllowFileAccess( true ); webView.getSettings().setAppCacheEnabled( true ); webView.getSettings().setJavaScriptEnabled( true ); webView.getSettings().setCacheMode( WebSettings.LOAD_DEFAULT ); // load online by default … Read more