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 / Comunicación / Funciones Google / Google Docs
  • Google Cloud Print
  • Operating mode on the phone
  • Required permissions
  • 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
Advertencia
A partir de la versión 27, This function is no longer available, as Google Cloud Print was discontinued. It is now recommended to use the iPrintPDF function.
Prints a document (text or PDF file, images, Word or Excel document, ...) by using the Cloud Print service of Google.
Ejemplo
sPath is string = CompleteDir(SysDirStorageCard()) + "invoice.pdf"
IF NOT GglPrintDocument(sPath)
	Error("The document was not printed.")
END
Sintaxis
<Result> = GglPrintDocument(<Path>)
<Result>: Boolean
  • True if the request for printing was performed (which means if the window for printer selection was displayed),
  • False otherwise. To get more details on the error, use ErrorInfo.
Note: It is not possible to know whether the print launch has been validated by the user.
<Path>: Character string
Name and full (or relative) path of the document to print. This parameter can correspond to:
  • a file found in the application directory.
  • a file found on the external memory (SDCard).
  • a file included in the application from the generation wizard. In this case, only the name of the file and its extension are required. The file does not have to be extracted beforehand.
  • an online resource. In this case, the URL of the resource must be prefixed by "http" (or "https").
Observaciones

Google Cloud Print

Google Cloud Print is a free service that is used to send, on the Google servers, the files that will be printed on the preset printers. Therefore, the print is performed via Internet.
To use the Google Cloud Print service:
  1. Configure the printers on the site of Google Cloud Print.
  2. In the application, use GglPrintDocument.
For full details of how to use Google Cloud Print, visit: http://www.google.com/cloudprint.

Operating mode on the phone

GglPrintDocument opens several pages in the current application.
  • If the user is not connected, a page for connecting to Google is displayed. In this page, you must type the login and password of the Google account that was used to define the printers.
  • A page proposes the different available printers. All you have to do is select the requested printer to define the print options and to start the final print.

Required permissions

This function changes the permissions required by the application.
Permission required: INTERNET: this permission allows applications to open network sockets.
AndroidWidget 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 GglPrintDocument 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.jar
Versión mínima requerida
  • Versión 18
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

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