ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / In-App Purchase functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
inAppListProductInfo (Function)
In french: inAppListeInfoProduit
Retrieves, from the store, information about the "In-App" products associated with the application.
Example
arrIdentifier is array of strings
IF InAndroidMode() THEN
arrIdentifier = ["product1", "product2", "product3", "product4", "unknown product"]
ELSE
arrIdentifier = ["ProductID1", "ProductID2", "ProductID3", ...
"ProductID4", "ProductID5", "unknown product"]
END
IF inAppListProductInfo(arrIdentifier, ListProductInfo) THEN
 ToastDisplay("Asks for the list of products sent.")
ELSE
Error("ERROR: " + ErrorInfo)
END
// --------------------
// ListProductInfo procedure
PROCÉDURE ListProductInfo(bSuccess is boolean, arrProducts is array of inAppProduct)
IF NOT bSuccess THEN
Error("Error: " + ErrorInfo())
RETURN
END
LooperDeleteAll(LOOP_ProductInfo)
FOR I = 1 _TO_ arrProducts.Count
LooperAddLine(LOOP_ProductInfo, arrProducts[I].Caption, ...
arrProducts[I].Description, arrProducts[I].Identifier, arrProducts[I].Price)
END
// Copy into the array global to the window
garrProduct <= arrProducts
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.
Remark: If an identifier does not correspond to an existing product, it is ignored.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback" procedure) run when receiving information about the products. 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: wd290android.aar
Minimum version required
  • Version 19
Comments
Click [Add] to post a comment

Last update: 06/30/2023

Send a report | Local help