Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

VersionCheckDialog

Provides a convenient way to notify users about an updated version of your app. More...

Import Statement: import Felgo 4.0
Inherits:

Item

Properties

Detailed Description

The VersionCheckDialog component can be used to display a notification dialog in case a newer version of the application is available and allows to open an URL where this new version can be obtained (e.g. the App Store).

The component compares the current application version code with the latest released version code that is specified using the latestVersionCode property.

The latestVersionCode and updateUrl properties can be specified per platform using the latestVersionCodePlatform and updateUrlPlatform platform-specific properties.

Note: This component is not meant to be used directly in your application code. Rather it is to be used in a file which is deployed to a web server - this file contains the version codes of your latest releases of your application.

Example Usage

Place the following code in myAppVersionCheck.qml file and deploy it to a web server. In your application, use the VersionCheckLoader component and set the URL to this file using the VersionCheckLoader::source property.

Whenever you release a new version of your application, update the version codes in this file on your web server and your users will be notified when they start the application the next time.

 import Felgo
 import QtQuick

 VersionCheckDialog {
   latestVersionCodeIOS: 114
   latestVersionCodeAndroid: 116

   updateUrlIOS: "https://itunes.apple.com/at/app/id1157319191"
   updateUrlAndroid: "https://play.google.com/store/apps/details?id=net.vplay.apps.QMLLive"

   dialogTitle: qsTr("Update Available")
   dialogText: qsTr("A new version is out! Update now?")
 }

Alternatively, you can use your own custom QML code instead of the VersionCheckDialog component and display any custom UI and perform any custom logic. Within your custom code, you can access the current version of the installed application using the system.appVersionCode context property and the platform using the system.platform context property.

Note: Remember that you can only use such QML and Felgo components and features in your custom version checker QML file that are already supported in the oldest deployed version of your app that might check for newer versions.

See also VersionCheckLoader.

Property Documentation

dialogText : string

Specifies the text of the dialog that is displayed when a newer version is available.

Default value of this property is the English text: "A new version is out! Update now?"


dialogTitle : string

Specifies the title of the dialog that is displayed when a newer version is available.

Default value of this property is the English text: "Update Available"


latestVersionCode : int

This property specifies the version code of the latest released version of your application. If the current version code (as determined by system.appVersionCode) is less than this latest version code, a dialog is displayed prompting the user to update.

By default this property is set to the value of one of the latestVersionCodePlatform platform-specific properties depending on the current value of system.platform.

It is recommended to set latestVersionCodePlatform properties for platforms on which you release your application instead.


latestVersionCodeAndroid : int

Specifies the latest application release version code when the system.platform is System.Android.


latestVersionCodeIOS : int

Specifies the latest application release version code when the system.platform is System.IOS.


latestVersionCodeLinux : int

Specifies the latest application release version code when the system.platform is System.Linux.


latestVersionCodeMac : int

Specifies the latest application release version code when the system.platform is System.Mac.


latestVersionCodeWindows : int

Specifies the latest application release version code when the system.platform is System.Windows.


updateUrl : string

Specifies the URL where the new version can be obtained. This URL is opened when a newer version is available and the user presses 'OK' in the confirmation dialog.

By default this property is set to the value of one of the updateUrlPlatform specific properties depending on the current value of system.platform.

It is recommended to set updateUrlPlatform properties for platforms on which you release your application instead. Typically this is set to the URL of the platform-specific app store page for the application.


updateUrlAndroid : string

Specifies the URL where the new version can be obtained for the System.Android platform.


updateUrlIOS : string

Specifies the URL where the new version can be obtained for the System.IOS platform.


updateUrlLinux : string

Specifies the URL where the new version can be obtained for the System.Linux platform.


updateUrlMac : string

Specifies the URL where the new version can be obtained for the System.Mac platform.


updateUrlWindows : string

Specifies the URL where the new version can be obtained for the System.Windows platform.


Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded