ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / User Groupware functions
  • Handling errors
  • Application in the background: Specific case from Android 10
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Allows you to log in to the User Groupware using an account such as Facebook, Google, Microsoft, etc.
Example
WINDEVWEBDEV - Server code
Identité 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> [, <Index>])
<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.
<Index>: Optional integer
Index of the custom connection when adding it with gpwAddAuthLogin. To use this parameter, <Type> must correspond to the gpwConnection constant.
Note: Connection information has been described and added using the gpwAddAuthLogin function.
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 identified using ErrorInfo.
Android

Application in the background: Specific case from Android 10

Starting with 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: wd300gpu.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help