SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Kspi Execute Plan Price Calculation
Kspi Execute Plan Price CalculationKspi Execute Plan Price Calculation
Kspi Execute Plan Price Calculation
whocanbe1
 
What is intercompany reconciliations
What is intercompany reconciliationsWhat is intercompany reconciliations
What is intercompany reconciliations
samuthra Thilak
 
+SWIFT MT798_799 to THE BANK OF NEW YORK MELLON (1)
+SWIFT MT798_799 to THE BANK OF NEW YORK MELLON (1)+SWIFT MT798_799 to THE BANK OF NEW YORK MELLON (1)
+SWIFT MT798_799 to THE BANK OF NEW YORK MELLON (1)
Michael Sheffield
 
Kb11 N Manual Reposting Of Costs
Kb11 N Manual Reposting Of CostsKb11 N Manual Reposting Of Costs
Kb11 N Manual Reposting Of Costs
whocanbe1
 

Tendances (20)

Po vendor down pay process SAP
Po vendor down pay process SAP Po vendor down pay process SAP
Po vendor down pay process SAP
 
Sap 1099 misc generic withholding tax reporting
Sap 1099 misc generic withholding tax  reportingSap 1099 misc generic withholding tax  reporting
Sap 1099 misc generic withholding tax reporting
 
Withholding tax in sap
Withholding tax in sapWithholding tax in sap
Withholding tax in sap
 
tifawt.com2
tifawt.com2tifawt.com2
tifawt.com2
 
Kspi Execute Plan Price Calculation
Kspi Execute Plan Price CalculationKspi Execute Plan Price Calculation
Kspi Execute Plan Price Calculation
 
What is intercompany reconciliations
What is intercompany reconciliationsWhat is intercompany reconciliations
What is intercompany reconciliations
 
SaaSy maps - using django-tenants and geodjango to provide web-gis software-a...
SaaSy maps - using django-tenants and geodjango to provide web-gis software-a...SaaSy maps - using django-tenants and geodjango to provide web-gis software-a...
SaaSy maps - using django-tenants and geodjango to provide web-gis software-a...
 
Rebate sap SD.ppt
Rebate sap SD.pptRebate sap SD.ppt
Rebate sap SD.ppt
 
Aa activo f ijo
Aa   activo f ijoAa   activo f ijo
Aa activo f ijo
 
SAP CO step by step config guide & user manual part 1
SAP CO step by step config guide & user manual part 1SAP CO step by step config guide & user manual part 1
SAP CO step by step config guide & user manual part 1
 
User manual co-io budgeting
User manual co-io budgetingUser manual co-io budgeting
User manual co-io budgeting
 
+SWIFT MT798_799 to THE BANK OF NEW YORK MELLON (1)
+SWIFT MT798_799 to THE BANK OF NEW YORK MELLON (1)+SWIFT MT798_799 to THE BANK OF NEW YORK MELLON (1)
+SWIFT MT798_799 to THE BANK OF NEW YORK MELLON (1)
 
Deferred taxes in Mexico
Deferred taxes in MexicoDeferred taxes in Mexico
Deferred taxes in Mexico
 
Fb03 gl document display
Fb03   gl document displayFb03   gl document display
Fb03 gl document display
 
Asset
AssetAsset
Asset
 
Android Threading
Android ThreadingAndroid Threading
Android Threading
 
Window Phone
Window PhoneWindow Phone
Window Phone
 
iOS Ecosystem
iOS EcosystemiOS Ecosystem
iOS Ecosystem
 
Kb11 N Manual Reposting Of Costs
Kb11 N Manual Reposting Of CostsKb11 N Manual Reposting Of Costs
Kb11 N Manual Reposting Of Costs
 
Android Lesson 3 - Intent
Android Lesson 3 - IntentAndroid Lesson 3 - Intent
Android Lesson 3 - Intent
 

En vedette

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
 

En vedette (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
 

Similaire à [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
 

Similaire à [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"
 

Dernier

Dernier (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
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
 

[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