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 / In-App Purchase functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
inAppListProductInfo (Function)
In french: inAppListeInfoProduit
Retrieves, from the store, information about the "In-App" products associated with the application.
Example
tabIdentifiant is array of strings 
IF InAndroidMode() THEN
	tabIdentifiant = ["produit1", "produit2", "produit3", "produit4", "produit inconnu"]
ELSE
	tabIdentifiant = ["IDProduit1", "IDProduit2", "IDProduit3", ...
		"IDProduit4", "IDProduit5", "produit inconnu"]
END
IF inAppListProductInfo(tabIdentifiant, ListeInfoProduits) THEN
	 ToastDisplay("Demande de la liste des produits envoyée.")
ELSE
	Error("ERREUR : " + ErrorInfo)
END
// --------------------
// Procédure ListeInfoProduits
PROCEDURE ListeInfoProduits(bSuccès is boolean, tabProduits is array of inAppProduct)
IF NOT bSuccès THEN
	Error("Erreur : " + ErrorInfo())
	RETURN
END
LooperDeleteAll(ZR_InfoProduit)
FOR i = 1 _TO_ tabProduits.Count
	LooperAddLine(ZR_InfoProduit, tabProduits[i].Caption, ...
		tabProduits[i].Description, tabProduits[i].Identifier, tabProduits[i].Price)
END
// Copie dans le tableau global à la fenêtre
gtabProduit <= tabProduits
Syntax
<Result> = inAppListProductInfo(<Identifiers of products> , <WLanguage procedure>)
<Result>: Boolean
  • True if the request for retrieving product information was performed,
  • False otherwise. To get more details on the error, use ErrorInfo.
<Identifiers of products>: Array of character strings
Identifiers of products to use. These identifiers are the ones defined when creating the products:
  • iPhone/iPad in iTunes Connect.
  • Android in the Google Play developer console.
Android You cannot ask to retrieve information about more than 20 products at a time. A fatal error occurs if more than 20 identifiers are specified.
Note: If an identifier does not correspond to an existing product, it is ignored.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure (also called "callback") executed when product information is received. For more details on this procedure, see Parameters of the procedure used by inAppListProductInfo.
Remarks
  • The request for information is asynchronous in order not to lock the application when retrieving information about the products. This operation can be quite long because network requests must be performed.
  • To find out the list of products purchased by the user and not consumed and the list of active subscriptions, use inAppListPurchase.
  • Android inAppListProductInfo has no effect if it is run from the Android simulator or emulator.
  • iPhone/iPad inAppListProductInfo must be called before any other call to inAppXXX functions.
Component: wd300android.aar
Minimum version required
  • Version 19
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help