This content has been translated automatically.  Click here  to view the French version.
  • Overview
  • Creating and deploying an Android widget
  • Specific features of widgets
  • WLanguage functions specific to Android widgets
  • Functions for managing widgets
  • Functions available for widgets
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Widgets are small applications that can be displayed on the home screen of phones or tablets. These widgets are used to display information updated on a regular basis and they propose simple interactions with the user.
With WINDEV Mobile, you can create widgets from your Android applications via Widget windows.
Creating and deploying an Android widget
The principle is very simple:
  1. You create an Android project. For more details, see Developing applications for Android.
  2. In your Android project, you create Widget windows. These windows contain all the features required by your widget.
    • Only 3 types of controls are available in Widget windows: the Button controls, Static controls and Image controls.
    • The styles of the fields of a Widget defined in editing will be ignored at runtime. It is only possible to set the color of Background fields and the Image of Background for the Button fields.
    • Widget windows present some specific features. For more details, see Widget windows.
  3. Generate your Android application. For more details, see Generating an Android application.
  4. Deploy the generated apk file.
  5. The widgets found in the application will be displayed in the list of available widgets and they can be installed on the desktop.

Specific features of widgets

The widgets of an application generated with WINDEV Mobile are run in a process different from the application itself.
However, all the widgets of the same application are run in the same process and therefore they will share the same execution context (global variables, HFSQL browse, ...).
The user has the ability to add on the home screen as many instances of the same widget as necessary. Each one of these instances will correspond to the same window instance: changes made to the window will automatically be applied to all displayed instances of the corresponding widget.
WLanguage functions specific to Android widgets

Functions for managing widgets

The following functions are used to manage specific features of Android widgets:
InWidgetModeIndicates whether the code is run in Android Widget mode.
WidgetDisplayRefreshes a widget window.
WidgetRunAppStarts the application to which a widget belongs.

Functions available for widgets

Most of the functions available for Android applications are also available in widget mode. To easily identify these functions, the icon appears in the bar of function platforms.
Minimum version required
  • Version 18
Click [Add] to post a comment