0% found this document useful (0 votes)
14 views1 page

Google Play Subscription Integration With QT

Google play subscription integration with Qt

Uploaded by

Blagoja Markov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Google Play Subscription Integration With QT

Google play subscription integration with Qt

Uploaded by

Blagoja Markov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Google play subscription integration with Qt/C++

Integrating Google Play subscriptions in a Qt/C++ Android application should involve


both native Android integration via Java and a secure backend server. I will try to
describe the necessary steps that lead to achieving the wanted feature:

 Creating a Java helper class which should include the Android billing library, or
specifically: [Link]:billing:6.0.1

 Setting up a backend server for secure validations of the purchases:

Although Google Play handles the payments and subscription renewals, it


doesn’t verify the purchases within the app or more precisely Google Play
doesn’t tell the application “This user has a valid subscription”. This means that
we have to somehow keep at least the status for each user (Active, Expired,
Cancelled) and it is not recommended to be within the application, because in
that way the subscription feature could be easily cracked.
The server can be created using Firebase, [Link], Django etc. and it
should use the Google Play Developer API to verify the payments and Real-
time Developer Notifications (RTDN) from Google to stay up to date with
ongoing subscription changes (renewals, expirations, refunds) and update the
user’s status based on that.

 Using QJniObject within Qt to interact with the Java helper class and also a
native methods from Java that will trigger C++ functions for specific events. For
example: “Payment completed, update the status of the user”.

 Using QNetworkAccessManager within Qt to interact with the server via HTTPS


requests.

You might also like