SlideShare ist ein Scribd-Unternehmen logo
1 von 23
By : Franky Wijanarko
PT. BUZOO INDONESIA
In-app Billing is a Google Play service that lets
you sell digital content from inside your
applications
 You can use In-app Billing to sell products as:
- Standard in-app products (one-time billing),
- Subscriptions, (recurring, automated billing)
 Any application that you publish through Google
Play can implement In-app Billing.

In-app Billing version 1 March 2011
 In-app Billing version 2 May 2012
 In-app Billing version 3 February 2013



Managed In-app Products
This means that the user's ownership of all in-app
item purchases is maintained by Google Play, and
your application can query the user's purchase
information when needed.
2 Types of Managed In-app Products :
◦ Non-consumable Items
Once purchased, these items will be permanently associated to
the user's Google account. An example of a non-consumable inapp product is a premium upgrade or a level pack.
◦ Consumable items
Implement consumption for items that can be made available for
purchase multiple times. Typically, these items provide certain
temporary effects. For example, the user's in-game character
might gain life points or gain extra gold coins in their inventory.


Subscriptions
A subscription is a product type offered in In-app
Billing that lets you sell content, services, or
features to users from inside your app with
recurring monthly or annual billing.


To implement In-app Billing in your application,
you need to do the following:
1.

Installing the Google Play Billing Library
Check whether or not the library is installed by
launching the Android SDK Manager by selecting the
Eclipse Window -> Android SDK Manager menu
option, scroll down to the Extras section and the Status
column next to the Google Play Billing Library
2. Adding Billing Permission to the Manifest File
3. Adding the IInAppBillingService.aidl File to the Project
4. Adding the Utility Classes to the Project
5. Obtaining the Public License Key for the Application



Create new Application
Click on the Services & APIs option to display the Base64encoded RSA public key for the application
6. Setting Up Google Play Billing in the Application
After success, we can add additional code to get an
inventory
of
stuff
we
own
:
mHelper.queryInventoryAsync(mGotInventoryListener);

mGotInventoryListener -> Listener that's called when
we finish querying the items and subscriptions we own
7. Initiating a Google Play In-app Billing Purchase

NOTE:


MainActivity.this -> A reference to the enclosing Activity instance from which the method is being
called



ITEM_SKU -> The SKU that identifies the product that is being purchased



10001 -> he request code which can be any positive integer value



mPurchaseFinishedListener -> The listener method to be called when the purchase is complete



"<payload>" -> The developer payload string. This can be any string value and can be used to
identify the purchase, or may be left empty
8. Implementing the onActivityResult Method
9.

Implementing the Purchase Finished Listener

If we use new Security.java, it cause a problem when using SKU testing. So we have to
replace verifyPurchase function with the old version of Security.java
10. Releasing the IabHelper Instance

11. Testing the In-app Billing Application
12. Creating a New In-app Product






We have to upload signed APK to Google Play Developer
Console.
Create a new product, set the product type to Managed
product, enter a Product ID (it wil be our ITEM_SKU).
In the second screen enter a title, description and price for
the item.
Change the menu at the top of the page to Activate.
Save
13. Adding In-app Billing Test Accounts


Google will not allow developers to make test purchases
from their own Google accounts.



In order to test in-app billing from this point on, it will be
necessary to setup other Google accounts as testing
accounts.



To add a test user account :


Click on the Settings icon located on the left hand side of your Google Play Developer Console
home screen and on the account details screen scroll down to the License Testing section. In the
Settings icon located on the left hand side of your Google Play Developer Console.



Scroll down to the License Testing.
As long as the application remains in draft status
within the Google Play Developer console, no charges
will be incurred by the user whilst testing the in-app
billing
Resource:
 Sprix Project
 http://developer.android.com/google/play/billing/index.html
 http://www.techotopia.com/index.php/Integrating_Goo
gle_Play_In-app_Billing_into_an_Android_Application_
%E2%80%93_A_Tutorial
Thank you

Weitere ähnliche Inhalte

Andere mochten auch

Android In-app Billing @ Droidcon Murcia
Android In-app Billing @ Droidcon MurciaAndroid In-app Billing @ Droidcon Murcia
Android In-app Billing @ Droidcon Murcia
Robot Media
 
Android in-app billing @ Google DevFest Barcelona 2012
Android in-app billing @ Google DevFest Barcelona 2012Android in-app billing @ Google DevFest Barcelona 2012
Android in-app billing @ Google DevFest Barcelona 2012
Robot Media
 

Andere mochten auch (13)

Clean code lecture part I
Clean code lecture part IClean code lecture part I
Clean code lecture part I
 
Android In-app Billing @ Droidcon Murcia
Android In-app Billing @ Droidcon MurciaAndroid In-app Billing @ Droidcon Murcia
Android In-app Billing @ Droidcon Murcia
 
CIS 2015 SAML-IN / SAML-OUT - Scott Tomilson & John Dasilva
CIS 2015 SAML-IN / SAML-OUT - Scott Tomilson & John DasilvaCIS 2015 SAML-IN / SAML-OUT - Scott Tomilson & John Dasilva
CIS 2015 SAML-IN / SAML-OUT - Scott Tomilson & John Dasilva
 
Android in-app billing @ Google DevFest Barcelona 2012
Android in-app billing @ Google DevFest Barcelona 2012Android in-app billing @ Google DevFest Barcelona 2012
Android in-app billing @ Google DevFest Barcelona 2012
 
Infinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan MarićInfinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan Marić
 
핑그래프(Fingra.ph) 모바일 광고 적용 사례
핑그래프(Fingra.ph) 모바일 광고 적용 사례핑그래프(Fingra.ph) 모바일 광고 적용 사례
핑그래프(Fingra.ph) 모바일 광고 적용 사례
 
Verma sons
Verma sonsVerma sons
Verma sons
 
Design Pattern with Burger
Design Pattern with BurgerDesign Pattern with Burger
Design Pattern with Burger
 
Canadian Anti-Spam Legislation(CASL) & New Marketing Strategies
Canadian Anti-Spam Legislation(CASL) & New Marketing StrategiesCanadian Anti-Spam Legislation(CASL) & New Marketing Strategies
Canadian Anti-Spam Legislation(CASL) & New Marketing Strategies
 
The beatles
The beatlesThe beatles
The beatles
 
realSociable Social Prospecting & Increasing Earned Value in Media
realSociable Social Prospecting & Increasing Earned Value in MediarealSociable Social Prospecting & Increasing Earned Value in Media
realSociable Social Prospecting & Increasing Earned Value in Media
 
Slicing Up the Mobile Services Revenue Pie
Slicing Up the Mobile Services Revenue PieSlicing Up the Mobile Services Revenue Pie
Slicing Up the Mobile Services Revenue Pie
 
Final Presentation-KUHN
Final Presentation-KUHNFinal Presentation-KUHN
Final Presentation-KUHN
 

Ähnlich wie [Android] Google Play in app billing

Monetize your app_with_google_subscriptions_v3_services_intuit
Monetize your app_with_google_subscriptions_v3_services_intuitMonetize your app_with_google_subscriptions_v3_services_intuit
Monetize your app_with_google_subscriptions_v3_services_intuit
Manohar Mahapatra
 
Google external login setup in ASP (1).pdf
Google external login setup in ASP  (1).pdfGoogle external login setup in ASP  (1).pdf
Google external login setup in ASP (1).pdf
findandsolve .com
 
Dodaii Detail English -tokyocamp-
Dodaii Detail English -tokyocamp-Dodaii Detail English -tokyocamp-
Dodaii Detail English -tokyocamp-
feynman
 
Mobi: "In-app Payments by Google & Apple"
Mobi: "In-app Payments by Google & Apple"Mobi: "In-app Payments by Google & Apple"
Mobi: "In-app Payments by Google & Apple"
MobileMonday Estonia
 

Ähnlich wie [Android] Google Play in app billing (20)

Monetize your app_with_google_subscriptions_v3_services_intuit
Monetize your app_with_google_subscriptions_v3_services_intuitMonetize your app_with_google_subscriptions_v3_services_intuit
Monetize your app_with_google_subscriptions_v3_services_intuit
 
Testing In App Billing
Testing In App BillingTesting In App Billing
Testing In App Billing
 
Payments in Mobile Apps
Payments in Mobile AppsPayments in Mobile Apps
Payments in Mobile Apps
 
Angular 11 google social login or sign in tutorial using angularx social-login
Angular 11 google social login or sign in tutorial using angularx social-loginAngular 11 google social login or sign in tutorial using angularx social-login
Angular 11 google social login or sign in tutorial using angularx social-login
 
Hospital app project (how to upload app)
Hospital app project (how to upload app)Hospital app project (how to upload app)
Hospital app project (how to upload app)
 
How to make money with the Windows Store
How to make money with the Windows StoreHow to make money with the Windows Store
How to make money with the Windows Store
 
Grocery App
Grocery AppGrocery App
Grocery App
 
How to submit ios app in Appstore
How to submit ios app in AppstoreHow to submit ios app in Appstore
How to submit ios app in Appstore
 
Online shopping ecommerce java project
Online shopping ecommerce java projectOnline shopping ecommerce java project
Online shopping ecommerce java project
 
Google analytics for iOS
Google analytics for iOSGoogle analytics for iOS
Google analytics for iOS
 
Flutter Android / iOS Build Preparation
Flutter Android / iOS Build PreparationFlutter Android / iOS Build Preparation
Flutter Android / iOS Build Preparation
 
Google external login setup in ASP (1).pdf
Google external login setup in ASP  (1).pdfGoogle external login setup in ASP  (1).pdf
Google external login setup in ASP (1).pdf
 
Grocery Mangement Project in C
Grocery Mangement Project in CGrocery Mangement Project in C
Grocery Mangement Project in C
 
Develpment of an electronics website Case Study
Develpment of an electronics website Case StudyDevelpment of an electronics website Case Study
Develpment of an electronics website Case Study
 
Dodaii Detail English -tokyocamp-
Dodaii Detail English -tokyocamp-Dodaii Detail English -tokyocamp-
Dodaii Detail English -tokyocamp-
 
iPhone first App Store submission
iPhone  first App Store submissioniPhone  first App Store submission
iPhone first App Store submission
 
What’s new in android o
What’s new in android oWhat’s new in android o
What’s new in android o
 
Introduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted ConfIntroduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted Conf
 
SmartVision Android App
SmartVision Android AppSmartVision Android App
SmartVision Android App
 
Mobi: "In-app Payments by Google & Apple"
Mobi: "In-app Payments by Google & Apple"Mobi: "In-app Payments by Google & Apple"
Mobi: "In-app Payments by Google & Apple"
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

[Android] Google Play in app billing

  • 1. By : Franky Wijanarko PT. BUZOO INDONESIA
  • 2. In-app Billing is a Google Play service that lets you sell digital content from inside your applications  You can use In-app Billing to sell products as: - Standard in-app products (one-time billing), - Subscriptions, (recurring, automated billing)  Any application that you publish through Google Play can implement In-app Billing. 
  • 3. In-app Billing version 1 March 2011  In-app Billing version 2 May 2012  In-app Billing version 3 February 2013 
  • 4.  Managed In-app Products This means that the user's ownership of all in-app item purchases is maintained by Google Play, and your application can query the user's purchase information when needed.
  • 5. 2 Types of Managed In-app Products : ◦ Non-consumable Items Once purchased, these items will be permanently associated to the user's Google account. An example of a non-consumable inapp product is a premium upgrade or a level pack. ◦ Consumable items Implement consumption for items that can be made available for purchase multiple times. Typically, these items provide certain temporary effects. For example, the user's in-game character might gain life points or gain extra gold coins in their inventory.
  • 6.  Subscriptions A subscription is a product type offered in In-app Billing that lets you sell content, services, or features to users from inside your app with recurring monthly or annual billing.
  • 7.  To implement In-app Billing in your application, you need to do the following: 1. Installing the Google Play Billing Library Check whether or not the library is installed by launching the Android SDK Manager by selecting the Eclipse Window -> Android SDK Manager menu option, scroll down to the Extras section and the Status column next to the Google Play Billing Library
  • 8.
  • 9. 2. Adding Billing Permission to the Manifest File
  • 10. 3. Adding the IInAppBillingService.aidl File to the Project
  • 11. 4. Adding the Utility Classes to the Project
  • 12. 5. Obtaining the Public License Key for the Application   Create new Application Click on the Services & APIs option to display the Base64encoded RSA public key for the application
  • 13. 6. Setting Up Google Play Billing in the Application
  • 14. After success, we can add additional code to get an inventory of stuff we own : mHelper.queryInventoryAsync(mGotInventoryListener); mGotInventoryListener -> Listener that's called when we finish querying the items and subscriptions we own
  • 15.
  • 16. 7. Initiating a Google Play In-app Billing Purchase NOTE:  MainActivity.this -> A reference to the enclosing Activity instance from which the method is being called  ITEM_SKU -> The SKU that identifies the product that is being purchased  10001 -> he request code which can be any positive integer value  mPurchaseFinishedListener -> The listener method to be called when the purchase is complete  "<payload>" -> The developer payload string. This can be any string value and can be used to identify the purchase, or may be left empty
  • 17. 8. Implementing the onActivityResult Method
  • 18. 9. Implementing the Purchase Finished Listener If we use new Security.java, it cause a problem when using SKU testing. So we have to replace verifyPurchase function with the old version of Security.java
  • 19. 10. Releasing the IabHelper Instance 11. Testing the In-app Billing Application
  • 20. 12. Creating a New In-app Product      We have to upload signed APK to Google Play Developer Console. Create a new product, set the product type to Managed product, enter a Product ID (it wil be our ITEM_SKU). In the second screen enter a title, description and price for the item. Change the menu at the top of the page to Activate. Save
  • 21. 13. Adding In-app Billing Test Accounts  Google will not allow developers to make test purchases from their own Google accounts.  In order to test in-app billing from this point on, it will be necessary to setup other Google accounts as testing accounts.  To add a test user account :  Click on the Settings icon located on the left hand side of your Google Play Developer Console home screen and on the account details screen scroll down to the License Testing section. In the Settings icon located on the left hand side of your Google Play Developer Console.  Scroll down to the License Testing.
  • 22. As long as the application remains in draft status within the Google Play Developer console, no charges will be incurred by the user whilst testing the in-app billing Resource:  Sprix Project  http://developer.android.com/google/play/billing/index.html  http://www.techotopia.com/index.php/Integrating_Goo gle_Play_In-app_Billing_into_an_Android_Application_ %E2%80%93_A_Tutorial