ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Properties specific to gglAccount variables
  • Prerequisites for using the gglAccount function
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The gglAccount type gets the profile information of a Google account via several WLanguage properties.
Note: The variable of type gglAccount variable is initialized when using the GglAccountAssociate function. This function enables users to log in to an application using a Google account registered on the device, without entering a username and password. See notes for necessary prerequisites.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
GglAccountAssociate(auth)

INTERNAL PROCEDURE auth(resultat is int, Compte is gglCompte)
	SWITCH resultat
		CASE gaaCanceled
			LIB_Auth = "Vous avez annulé l'authentification."
		CASE gaaFailed
			LIB_Auth = "Erreur pendant l'authentification" + CR + ErrorInfo()
		CASE gaaSuccess
			LIB_Auth = "Bonjour " + Compte..Name + " " + Compte..FirstName
	END
 END
Properties

Properties specific to gglAccount variables

The following properties can be used to manipulate a Google Account:
Property nameType usedEffect
EmailCharacter stringEmail address of the user associated with the Google account.
This property is read-only.
New in version 2025
DisplayedName
Character stringAlias or pseudonym of the authenticated user, associated with the Google Account used.
This property is read-only.
Note: This property is only available from version 2025 Update 1.
FirstNameCharacter stringFirst name of the user associated with the Google account.
This property is read-only.
IDTokenBufferGoogle authentication token.
This property is read-only.
LastNameCharacter stringLast name of the user associated with the Google account.
This property is read-only.
ProfilePictureURI variableProfile picture of the user associated with the Google account.
This property is read-only.
Remarks

Prerequisites for using the gglAccount function

  1. Create a project in the Google Cloud console (https://console.cloud.google.com) or open an existing project.
  2. Click "APIs & Services".
  3. On the "Credentials" tab, click "CREATE CREDENTIALS", then "OAuth Client ID", expand "Application type" and select "Android" (if you don't have an ID of this type yet). Specify your application's package name and SHA-1 signing certificate fingerprint.
    WINDEV Mobile provides this package name in the first step of the Android application generation wizard.
    The SHA-1 signature can be found in the Android application generation wizard ("Configuration", "Advanced configuration").
  4. On the "Credentials" tab, click "CREATE CREDENTIALS", then "OAuth Client ID", expand "Application type" and select "Web application" (if you don't have an ID of this type yet). You can leave the "Authorized JavaScript origins" and "Authorized redirect URIs" empty. This ID represents your "back end" authentication server. This ID must be specified in the Android application generation wizard in WINDEV Mobile.
  5. Optional step: In the "OAuth consent screen", complete the information and in particular the URLs for the privacy policy and terms of use.
In the application generation wizard, in "'Sign in with Google' authentication", enter the web application client ID defined previously.
Minimum version required
  • Version 2024
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help