PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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..Occurrence
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> , <Procedure Name>)
<Result>: Boolean
  • True if the request for retrieving product information was performed,
  • False otherwise. To find out the error details, 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 will occur if more than 20 identifiers are specified.
Note: If an identifier does not correspond to an existing product, it is ignored.
<Procedure Name>: Character string (with or without quotes)
Name of the WLanguage procedure ("callback" procedure) run when receiving information about the products. This procedure has the following format:
PROCEDURE <Procedure Name>(<Success> is boolean,
<Product Information> is array of inAppProduct)
where
  • <Success> is boolean:
    • True if information about the products was retrieved,
    • False otherwise. For more details about the error, use ErrorInfo before any other call to a WLanguage function (that would reinitialize the error).
  • <Product information> is an array of inAppProduct variables containing information about each one of the existing products whose identifier was specified. If the identifier does not correspond to an existing product, it is ignored.
    If <Success> = False, the array will be empty.
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.
  • Android To find out the list of products purchased by the user and not consumed, use inAppListPurchase. 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.
  • Android inAppListProductInfo is available on the devices running Android version 2.2 or later (api level 8). A fatal error will occur if the function is used with an earlier system version.
    To find out the version of Android system on which the application is run, use SysAndroidVersion.
Components
Windows Mobile wp230device.dll
Minimum required version
  • Version 19
Comments
Click [Add] to post a comment