ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / User Groupware functions
  • Handling errors
  • Application in the background: Specific case from Android 10
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Allows you to connect to the User Groupware using authentication with an account such as Facebook, Google, Microsoft, etc.
Example
WINDEVWEBDEV - Server code
Identity is OpenIDIdentity = gpwAuthLogin(gpwFacebook)
AndroidiPhone/iPad
arrOAuthParam is array of gpwOAuthParameters
arrOAuthParam = gpwListOAuthParameters()
IF ErrorOccurred THEN
Error(ErrorInfo())
RETURN
END
 
Parameters is gpwOAuthParameters = arrOAuthParam[1]
sCode is string = gpwAuthLogin(Parameters)
IF ErrorOccurred THEN
Error(ErrorInfo())
RETURN
END
 
User is gpwUser
sToken is string
(sToken, User) = gpwRemoteConnect(Parameters, sCode)
IF ErrorOccurred THEN
Error(ErrorInfo())
RETURN
END
Syntax
WINDEVWEBDEV - Server code
<Result> = gpwAuthLogin(<Type> [, <Subscript>])
<Result>: OpenIDIdentity variable
OpenIDIdentity variable that contains the user information.
<Type>: Integer constant
Type of login that allows for authentication:
gpwConnectionStandard login with a user that has been created and registered.
gpwFacebookLogin with a Facebook account.
gpwGoogleLogin with a Google account.
gpwMicrosoftLogin with a Microsoft MSN account.
gpwSalesforceLogin with a Salesforce account.
gpwYahooLogin with a Yahoo account.
<Subscript>: Optional integer
Index of the custom connection when adding it with gpwAddAuthLogin. To use this parameter, <Type> must correspond to the constant gpwConnection.
Remark: The login information has been described and added via gpwAddAuthLogin.
AndroidiPhone/iPad
<Result> = gpwAuthLogin(<Parameter>)
<Result>: Buffer
User identification code to use with gpwRemoteConnect.
<Parameter>: gpwOAuthParameters variable
Name of the gpwOAuthParameters variable that contains the characteristics of the OAuth application to use for authentication.
Remarks

Handling errors

If a login error occurs, the ErrorOccurred variable is set to True. The error can be known via ErrorInfo.
Android

Application in the background: Specific case from Android 10

From Android 10, it is no longer possible to open a window when the application is in the background.
gpwAuthLogin can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). The application will be brought back to the foreground when the notification is clicked, if the ActivateApplication property is set to True. You can also open a window from the procedure passed to the ActionClick property.
Business / UI classification: Neutral code
Component: wd290gpu.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/06/2023

Send a report | Local help