AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas para móviles / Funciones de teléfono
  • Aplicación en segundo plano: Caso concreto de Android 10
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
CheckUserIDentity (Function)
Checks the identity of the current user using biometric authentication.
If the authentication is available, a message asks the user to log in. Then, the WLanguage authentication procedure is called.
Attention: This function only verifies the user's identity via the data stored on their cell phone.. It is not possible to capture the user's fingerprint.
Remarks:
  • iPhone/iPadIOS WidgetMac Catalyst This function is available from iOS version 8.0. The project must be compiled with Xcode 6 (or later). This function is using:
    • the "Touch ID" feature of iPhones 5S and later versions.
    • the "Facial recognition" feature of iPhone X.
  • Android This feature is available from Android 6.0 (api level 23).
Ejemplo
CheckUserIdentity("Check the identity for unlocking", Authentication)

	// Check procedure
	INTERNAL PROCEDURE Authentication(nStatus is int, sErrorMessage is string)

		SWITCH nStatus
			CASE cuiAuthenticated
				// Authentication OK.
			CASE cuiAuthenticationFailure
				Error("Authentication failed: " + sMessageError)
				// Try again.
				CheckUserIdentity("Check the identity for unlocking", Authentication)
			CASE cuiCustomAuthentication,cuiAuthenticationUnavailable
				// Password required in this case.
				pwd is string
				SWITCH Input("Enter password: ", mdp)
					CASE 1: // OK
						IF pwd ="1234" THEN
							// Authentication OK.
						ELSE
							Error("Incorrect password")
							// Try again.
							CheckUserIdentity("Check the identity for unlocking", Authentication)
						END
					CASE 0: // Cancel
						Close()
				END
		END
	END
Sintaxis
CheckUserIDentity(<Message> , <WLanguage procedure> [, <Button caption>])
<Message>: Character string
Message that will be displayed to the user.
iPhone/iPadIOS WidgetMac Catalyst
  • If this string is a multiline string, only the first line will be visible in the authentication popup.
  • This parameter is ignored during a facial recognition.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called once the user authentication is complete. This procedure has the following format:
PROCEDURE <Procedure name> (<Status>, <Error message>)
where:
  • is an integer constant indicating the authentication status:
    cuiAuthenticatedThe user was properly authenticated.
    cuiAuthenticationFailureThe authentication failed.
    cuiAuthenticationUnavailableThe authentication feature is not available or it was disabled by the user.
    cuiCustomAuthenticationThe user has asked to authenticate using a password: the application will have to manage this authentication manually.
  • is a character string containing the system error message if the authentication fails (cuiAuthenticationFailure constant). Otherwise, this parameter corresponds to an empty string.
<Button caption>: Optional character string
Default caption of authentication button (displayed on the button for typing the password). This button is used to connect without checking the biometrics. This button is displayed as soon as the first failure occurs.
Observaciones
Android

Aplicación en segundo plano: Caso concreto de Android 10

A partir de Android 10, no se puede abrir una ventana si la aplicación está en segundo plano.
La función CheckUserIDentity puede abrir una ventana. Si se utiliza esta función cuando la aplicación está en segundo plano, se producirá un error fatal.
Consejos:
  • Para saber si la aplicación está en segundo plano, utilice la función InBackgroundMode.
  • Si una aplicación necesita interactuar con el usuario cuando está en segundo plano, se puede mostrar una notificación (con el tipo Notification). La aplicación volverá al primer plano cuando se haga clic en la notificación, si la propiedad ActivateApplication se establece en True. También es posible abrir una ventana desde el procedimiento pasado a la propiedad ActionClick.
Para obtener más información, consulte Android 10: Comportamiento de las aplicaciones en segundo plano.
Componente: wd300android.aar
Ver también
Versión mínima requerida
  • Versión 20
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local