diff options
Diffstat (limited to 'examples/demos/hangman/doc/src/androidclasses.qdoc')
-rw-r--r-- | examples/demos/hangman/doc/src/androidclasses.qdoc | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/examples/demos/hangman/doc/src/androidclasses.qdoc b/examples/demos/hangman/doc/src/androidclasses.qdoc new file mode 100644 index 000000000..8e4224438 --- /dev/null +++ b/examples/demos/hangman/doc/src/androidclasses.qdoc @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtpurchasing-androidclasses.html + \title Demo Android Classes + \brief Android classes are used in the purchasing demo to enable purchasing in Android. + \ingroup qtpurchasing-examples + + \section1 Classes + \table + \row + \li \l AndroidInAppProduct + \li A product registered in the store. + \row + \li \l AndroidInAppTransaction + \li Contains information about a transaction in the external app store. + \row + \li \l AndroidInAppPurchaseBackend + \li Comminucates with external store. + \row + \li \l androidjni.cpp and InAppPurchase.java + \li Communication between Google Play's billing system and C++. + \endtable + + Check out \l {Base Classes} + + \section1 AndroidInAppProduct + + AndroidInAppProduct adds purchase() for initializing purchasing process. + + \section1 AndroidInAppTransaction + + AndroidInAppTransaction is created in the AndroidInAppPurchaseBackend using + purchaseSucceeded(), purchaseFailed() and checkFinalizationStatus(). + + AndroidInAppTransaction adds new parameters and return types. + Class has finalize() function that separates Consumable and Unlockable + products to be either acknowledged or consumed in the InAppPurchase.java. + + \section1 AndroidInAppPurchaseBackend + + AndroidInAppPurchaseBackend makes and receives calls from InAppPurchase.java. + This class is one of the back end components in the application. + + \section2 Initialize + + Shows the products information on the store page. + + \list 1 + \li AndroidInAppPurchaseBackend is called from InAppStore::setupBackend(). + \li At initialization AndroidInAppPurchaseBackend will give \l {https://developer.android.com/reference/android/content/Context} {Context} and + pointer of its self to the Java in the calls constructor and then + initializes the connection to the Google Play store using the initialize() + function. + \li When the connection is successful, androidjni will call registerRedy() which + emits the ready() singnal to InAppStore and starts queryProducts() function to get + the information of the purchasable items. + \li When the query is done, productQueryDone() signal is emitted and + the item's information will be visible on the application's store page. + \endlist + + \section2 Purchasing + + When pressing one of the products on the applications store page a call is routed + through \c AndroidInAppProduct::purchase() to purchaseProduct() function. This then calls + the Java method launchBillingFlow() which opens Goole Plays billing flow to the user. + + \section1 InAppPurchase.java and androidjni.cpp + + AndroidInAppPurchaseBackend makes calls directly to InAppPurchase.java and + receives Java calls from androidjni. The demo application communicates + with Java function using \l QJniObjects. + + \sa \l {https://developer.android.com/google/play/billing/integrate#java}{Integrate the Google Play Billing Library}, \l QJniObjects and \l QJniEnvironment. +*/ |