PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
New WINDEV Mobile 25 feature!
  • Overview
  • Reminder: the target API level ("TargetSdkVersion")
  • Behavior of applications in the background
  • Overview
  • Changes from WINDEV Mobile 25 Update 3
  • List of related functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Android 10: Modifying the behavior of applications
Overview
After each new version of Android is deployed, Google requires a higher target API level ("TargetSdkVersion") to publish applications on Google Play. With the release of Android 10, Google now requires API level 29 to allow deployments. This applies from:
  • 3 August 2020 for new applications,
  • 2 November 2020 for application updates.
To generate an application with this API level, it is necessary to use WINDEV Mobile 25 "Update 4".
These are the changes that apply to applications:
  1. On Android 10
    • When the application is in the background, it is no longer possible to open a window. For more details, see Behavior of applications in the background.
    • It is no longer possible to get a unique device identifier with SysIMEI and SysSerialNum. "Device owner" applications are not affected by this restriction.
    • It is no longer possible to manipulate WiFi connection parameters by programming. The following functions trigger a fatal error when used in Android 10 or higher: WiFiActivate (syntax to modify activation only), WiFiAddNetwork, WiFiDeleteNetwork, WiFiConnect and WiFiListNetwork.
      "Device owner" applications are not affected by this restriction.
    • The content of the clipboard can no longer be retrieved if the application is in the background. In this case, Clipboard will return an empty string.
  2. On Android 10 with API level 29:
Remark: The following error may appear when publishing an application on the Play Store: "The private key was not properly encrypted or is not a type of key we support". It is necessary to recreate the signature file of the application (this file can be recreated in the application generation wizard)..
Caution: If identifiers are based on the signature file (e.g. Google Map identifier), it is also necessary to regenerate these identifiers with the new key.

Reminder: the target API level ("TargetSdkVersion")

When an Android application is compiled, the generated APK includes a target API level ("TargetSdkVersion") of the Android SDK. With this level of target API, Android determines the features that can be included in the application, and the security rules that must be applied to it.
The target API level ("TargetSdkVersion") assigned to an application can be seen in the APK generation wizard, in the "Configuration" step:
  1. Click "Advanced configuration",
  2. In the "Advanced configuration" window, select "Edit manifest",
  3. Expand the "uses-sdk" node,
  4. "android:targetSdkVersion" shows the target API level.
This API level can also be modified. This means that it is possible to specify target API level 29 in a WINDEV Mobile application generated with a version earlier than Update 4. But in this case the application will not have a framework adapted to the specifics of this API level. This solution should therefore be avoided, since Android will apply security rules different from those for which the application has been tested.
See Google's website for more details.
Behavior of applications in the background

Overview

From Android 10, Google no longer allows an application running in the background to open a window (Activity) https://developer.android.com/guide/components/activities/background-starts. This is a very important change that affects all Android applications, including those generated with WINDEV Mobile. "Device owner" applications are the only exception. In this specific mode, apps can still open a window.
An application that ran properly in all Android versions prior to 10 will therefore have limitations if it is installed on Android 10:
  • when the application is in the background, it can no longer open a window (OpenMobileWindow, Info, Error, Dialog, etc.),
  • a WLanguage function that opens a window can no longer be used (SMSRunApp, etc.),
  • the Android framework of the application will also be blocked and will not be able to open a window from the background. The following functionalities require opening a window from the background:
These limitations apply to all applications generated with WINDEV Mobile 25 "Update 2" and earlier versions.

Changes from WINDEV Mobile 25 Update 3

The Android framework of WINDEV Mobile applications has been modified to take into account this requirement from Google. All necessary adaptations are included from WINDEV Mobile 25 "Update 3" onwards.
From WINDEV Mobile 25 "Update 3", push notifications, position tracking, beacon detection, ... are restored. Additionally, the WLanguage security mechanism has been improved to trigger a fatal error if a function that opens a window is called when the application is in the background (see list of relevant functions).
In order to make sure that an application runs properly on Android 10, you need to:
  • use WINDEV Mobile 25 "Update 3" to generate it,
  • check all processes that can be run from the application in the background : these processes must not open a window. To optimize your code, you can:
    • Use InBackgroundMode to determine whether or not the current process is run in the background.
    • If an application needs to interact with the user while it is in the background, the recommended solution is to display a notification. When the notification is clicked on, the application will be brought back to the foreground and will be allowed to open a window from the procedure called via the ..ActionClick property of the notification (..ActivateApplication must be set to True for the Notification variable).
  • when fine-tuning the application on an Android device, use the Android log to identify the origin of a possible crash during background execution. Since a window cannot be opened from the background, the WLanguage security mechanism cannot transmit any information. Errors are logged in the Android log.

List of related functions

The following functions trigger a fatal error if a call is made from a code run in the background:
Versions 17 and later
AlbumPicker
New in version 17
AlbumPicker
AlbumPicker
Retrieves a photo, an image or a video stored in the photo album of the mobile device.
Versions 18 and later
AppointmentCreate
New in version 18
AppointmentCreate
AppointmentCreate
Displays the window for appointment creation of native application for managing appointments found on the Android device.
Versions 18 and later
AppointmentDisplay
New in version 18
AppointmentDisplay
AppointmentDisplay
Displays an appointment in the native application for managing appointments found on the mobile device (Android or iOS).
Versions 19 and later
AppOpenForm
New in version 19
AppOpenForm
AppOpenForm
Opens:
  • the form of an application on Android (Play Store), iOS (App Store) or Windows (Windows Store) in order for the user to give a mark to it and/or to comment it.
  • the form for configuring the In-App purchases of an application.
Versions 22 and later
AuthIdentify
New in version 22
AuthIdentify
AuthIdentify
Performs an authentication using the OAuth 2.0 protocol on any webservice.
Versions 16 and later
BCCapture
New in version 16
BCCapture
BCCapture
Decodes the information stored in a bar code by using the device camera (Android, iPhone, iPad).
Versions 12 and later
BTChangeVisibility
New in version 12
BTChangeVisibility
BTChangeVisibility
Changes the visibility of a Bluetooth radio.
Versions 20 and later
CheckUserIdentity
New in version 20
CheckUserIdentity
CheckUserIdentity
Allows you to check the real identity of the current user via biometrics check.
Versions 09 and later
Confirm
New in version 09
Confirm
Confirm
Displays a message in a standard dialog box that proposes "Yes", "No", "Cancel" and returns the user's choice.
Versions 25 and later
ConfirmAsynchronous
New in version 25
ConfirmAsynchronous
ConfirmAsynchronous
Displays a non-blocking message in a standard dialog box with the answers "Yes", "No", "Cancel" and calls a WLanguage procedure with the user's response.
Versions 16 and later
ContactCreate
New in version 16
ContactCreate
ContactCreate
Displays the window for contact creation of the native application for contact management found on the device (Android, iPhone or iPad, Universal Windows).
Versions 16 and later
ContactDisplay
New in version 16
ContactDisplay
ContactDisplay
Opens the form of a contact in the native application for contact management of the device (Android, iPhone or iPad, Universal Windows).
Versions 16 and later
ContactEdit
New in version 16
ContactEdit
ContactEdit
Opens the form of a current contact in edit mode in the native application for contact management found on the device (Android, iPhone, iPad, Universal Windows).
Versions 16 and later
ContactSelect
New in version 16
ContactSelect
ContactSelect
Displays the list of contacts found on the device (Android, iPhone or iPad, Universal Windows).
Versions 17 and later
DatePicker
New in version 17
DatePicker
DatePicker
Displays the system date picker.
Versions 10 and later
Dialog
New in version 10
Dialog
Dialog
Displays a message box and returns the value of the button clicked by the user.
Versions 25 and later
DialogAsynchronous
New in version 25
DialogAsynchronous
DialogAsynchronous
Displays a non-blocking message box and calls a WLanguage procedure with the value of the button clicked by the user.
Versions 09 and later
EmailOpenMail
New in version 09
EmailOpenMail
EmailOpenMail
Opens the default messaging software:
  • of Web user on the browser computer.
  • of the user on the current Windows computer.
  • on the phone.
Versions 16 and later
EmailRunApp
New in version 16
EmailRunApp
EmailRunApp
Starts the native application for sending emails found on the current computer:
  • Computer running Windows,
  • Mobile device (Android, iPhone, iPad).
Versions 09 and later
Error
New in version 09
Error
Error
Displays a custom error message in a system error window.
Versions 25 and later
ErrorAsynchronous
New in version 25
ErrorAsynchronous
ErrorAsynchronous
Displays a custom error message in a non-blocking system error window.
Versions 15 and later
ErrorBuild
New in version 15
ErrorBuild
ErrorBuild
Displays a custom error message in a system error window.
Versions 09 and later
ExeRun
New in version 09
ExeRun
ExeRun
Starts the execution of a program (an executable for example) from the current application.
Versions 21 and later
FBStartSession
New in version 21
FBStartSession
FBStartSession
Used to authenticate and log in to Faceboook.
Versions 17 and later
geoRunApp
New in version 17
geoRunApp
geoRunApp
Starts the native mapping application of the device to display:
  • a specific geographical location,
  • an itinerary between two locations.
Versions 18 and later
GglPrintDocument
New in version 18
GglPrintDocument
GglPrintDocument
Prints a document (text or PDF file, images, Word or Excel document, ...) by using the Cloud Print service of Google.
Versions 24 and later
gpwAuthLogin
New in version 24
gpwAuthLogin
gpwAuthLogin
Allows you to connect to the User Groupware using authentication with an account such as Facebook, Google, Microsoft, etc.
Versions 19 and later
inAppPurchaseProduct
New in version 19
inAppPurchaseProduct
inAppPurchaseProduct
Sends a request for purchasing an "In-App" product associated with the application.
Versions 09 and later
Info
New in version 09
Info
Info
Displays a custom message in a system information window.
Versions 25 and later
InfoAsynchronous
New in version 25
InfoAsynchronous
InfoAsynchronous
Displays a non-blocking custom message in a system information window.
Versions 15 and later
InfoBuild
New in version 15
InfoBuild
InfoBuild
Displays a custom message in a system information window.
Versions 10 and later
Input
New in version 10
Input
Input
Displays a message allowing the user to type an information.
Versions 25 and later
KioskDisable
New in version 25
KioskDisable
KioskDisable
Disables kiosk mode for the current application.
Versions 25 and later
KioskEnable
New in version 25
KioskEnable
KioskEnable
Switches the current Android application to kiosk mode.
Versions 18 and later
NFCReadTag
New in version 18
NFCReadTag
NFCReadTag
Starts reading a NFC tag or enables the detection of NFC tags for the current window.
Versions 18 and later
NFCSendTag
New in version 18
NFCSendTag
NFCSendTag
Sends a NFC tag to another device.
Versions 18 and later
NFCWriteTag
New in version 18
NFCWriteTag
NFCWriteTag
Starts writing data onto a NFC tag.
Versions 09 and later
OKCancel
New in version 09
OKCancel
OKCancel
Displays a message in a standard dialog box that proposes "OK" and "Cancel" and returns the user's choice.
Versions 25 and later
OKCancelAsynchronous
New in version 25
OKCancelAsynchronous
OKCancelAsynchronous
Displays a message in a standard non-blocking dialog box with the answers "OK" and "Cancel" and calls a WLanguage procedure with the user's response.
Versions 19 and later
OpenMobileWindow
New in version 19
OpenMobileWindow
OpenMobileWindow
Opens a window in a mobile application.
Versions 09 and later
ShellExecute
New in version 09
ShellExecute
ShellExecute
Opens a document in its associated application.
Versions 19 and later
SMSRunApp
New in version 19
SMSRunApp
SMSRunApp
Starts the native application for sending SMSs found on the device (Android or iPhone/iPad).
Versions 17 and later
SpeechRecognitionTrigger
New in version 17
SpeechRecognitionTrigger
SpeechRecognitionTrigger
Triggers the service for speech recognition on the device.
Versions 17 and later
SpeechSynthesisInitialize
New in version 17
SpeechSynthesisInitialize
SpeechSynthesisInitialize
Initializes the parameters of speech synthesis for the current application.
Versions 17 and later
SpeechSynthesisReadFile
New in version 17
SpeechSynthesisReadFile
SpeechSynthesisReadFile
Reads the content of the specified file by using the engine for speech synthesis found on the device.
Versions 17 and later
SpeechSynthesisReadText
New in version 17
SpeechSynthesisReadText
SpeechSynthesisReadText
Reads the specified text using the device's text-to-speech engine.
Versions 18 and later
StartShare
New in version 18
StartShare
StartShare
Opens a popup allowing you to select the application that will be used to share a resource (text or document).
Versions 15 and later
tapiDialerCall
New in version 15
tapiDialerCall
tapiDialerCall
Opens the default telephony application (dialer) found on the phone and dials the specified number.
Versions 15 and later
tapiDialerDisplay
New in version 15
tapiDialerDisplay
tapiDialerDisplay
Opens the default telephony application (dialer) and displays the specified number. No call is made.
Versions 17 and later
TimePicker
New in version 17
TimePicker
TimePicker
Displays the time picker of system.
Versions 24 and later
URISelect
New in version 24
URISelect
URISelect
Opens a system window to select a resource coming:
  • from the device file system,
  • from the Cloud (Google Drive, Microsoft OneDrive, etc.)
  • or from one of the content managers installed on the device.
Versions 16 and later
VideoStartApp
New in version 16
VideoStartApp
VideoStartApp
Starts the device's native camera application to record a video or to take a photo.
Versions 09 and later
Warning
New in version 09
Warning
Warning
Displays a custom message in a system warning window.
Versions 25 and later
WarningAsynchronous
New in version 25
WarningAsynchronous
WarningAsynchronous
Displays a custom message in a non-blocking system warning window.
Versions 09 and later
YesNo
New in version 09
YesNo
YesNo
Displays a message in a standard dialog box that proposes "Yes" and "No" and returns the user's choice.
Versions 25 and later
YesNoAsynchronous
New in version 25
YesNoAsynchronous
YesNoAsynchronous
Displays a message in a standard non-blocking dialog box with the answers "Yes" and "No" and calls a WLanguage procedure with the user's response.
Minimum version required
  • Version 25
Comments
Click [Add] to post a comment