in app purchases for an android game
play

In-App Purchases for an Android Game Bill Lahti Tridroid Meeting - PowerPoint PPT Presentation

In-App Purchases for an Android Game Bill Lahti Tridroid Meeting August 7, 2014 Bill Lahti Bill is a software engineer who builds mobile applications and knowledge management solutions. Bill works at Duke Corporate Education. Outside of work,


  1. In-App Purchases for an Android Game Bill Lahti Tridroid Meeting August 7, 2014

  2. Bill Lahti Bill is a software engineer who builds mobile applications and knowledge management solutions. Bill works at Duke Corporate Education. Outside of work, his main interests are writing Android tutorials for his blog and building Android apps. blahti.wordpress.com - Android tutorials wglxy.com Android Apps ● Gomoku League https://play.google.com/store/apps/details? id=com.wglxy.gomoku.a ● Double Star http://www.wglxy.com/double-star-beta

  3. Overview ● In-App Purchases example ● Different revenue models for apps ● In-App Billing for Android ● What you should consider for in-app purchases ● How in-app purchases are handled in other apps (Angry Birds, Temple Run, Candy Crush Saga) ● In-app purchases in Double Star ● How many in-app items should you have? ● How do you call the player's attention to them? ● Pricing considerations ● How to implement In-App Billing ○ TrivialDrive example app ○ Adapting example to your own app

  4. Example of In-App Purchases Trivial Drive demo app from Google Developers App: Drive your car. When you run out of gas, purchase gas. Design Considerations - UI elements - Invitation to purchase

  5. Trivial Drive

  6. Trivial Drive

  7. In-App Purchases and Other Revenue Models Different revenue models Monetizing Android Apps - Google IO 2012 https://www.youtube.com/watch?v=DJdx_Wd_EOo Making Money on Google Play - Google IO 2013 https://plus.google.com/u/0/communities/113741436953313178716 I have been working on a “freemium” model. Free app with in-app purchases.

  8. Monetizing Android Apps https://www.youtube.com/watch?v=DJdx_Wd_EOo

  9. In-App Purchases are doing well https://plus.google.com/u/0/communities/113741436953313178716

  10. A Sample App: Trivial Drive Trivial Drive demo app from Google Developers How does it work? How do you implement in- app billing?

  11. Trivial Drive Sample In-app billing code is not too difficult. Definitely start with a working app. Learn: ● How to define products for sale. ● Learn how to make them available for sale in your app. ● Learn how to make a transaction. Things you need to know: ● How to package app as apk ● How to “sign” your app ● How to release your app on Google Developers Console. ● How to do Alpha / Beta release ● How to do a test purchase ● How to set up Google Wallet Merchant

  12. Trivial Drive Tutorial My blog: blahti. wordpress.com Step-by-step walkthrough of their example. My article highlights key points and makes a few corrections. Reference: http://blahti.wordpress.com/2014/07/30/how-to-add-in-app-billing-in-android-part-1/

  13. Tutorial Summary We won’t go through the tutorial here. Read the blog article. A few points: Developer console Defining an app Packaging your app Inside the code Application key Releasing your app - Alpha Testing your app Study the code

  14. Study the Code Getting the list of items for sale Seeing what items have already been purchased Starting and completing transactions to purchase an item interface IInAppBillingService util package

  15. onCreate of MainActivity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // load game data loadData(); String base64EncodedPublicKey = “REAL KEY GOES HERE”; ...

  16. onCreate of MainActivity mHelper = new IabHelper(this, base64EncodedPublicKey); mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { public void onIabSetupFinished(IabResult result) { // IAB is fully set up. Now, let's get an inventory of stuff we own. mHelper.queryInventoryAsync(mGotInventoryListener); } });

  17. onCreate of MainActivity (continued) // Listener that's called after querying the items and subscriptions we own IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() { public void onQueryInventoryFinished(IabResult result, Inventory inventory) { // Check for items we own. Notice that for each purchase, we check // Do we have the premium upgrade? Purchase premiumPurchase = inventory.getPurchase (SKU_PREMIUM); mIsPremium = (premiumPurchase != null && verifyDeveloperPayload (premiumPurchase)); ... updateUi(); setWaitScreen(false); }

  18. onBuyGasButtonClicked public void onBuyGasButtonClicked(View arg0) { // launch the gas purchase UI flow. // We will be notified of completion via mPurchaseFinishedListener setWaitScreen(true); mHelper.launchPurchaseFlow(this, SKU_GAS, RC_REQUEST, mPurchaseFinishedListener, payload); }

  19. Testing Trivial Drive See section in blog article. Use test accounts first. Then release Alpha version. Test with regular accounts. Refund test orders in your Google Wallet Merchant account.

  20. What do you do after Trivial Drive? Think about your app design ● What is your game / app? ● Are in-app purchases right for it? ● How would you implement in-app purchases? ● How is your app structured?

  21. Design Considerations ● What you should consider for in-app purchases ● How in-app purchases are handled in other apps (Angry Birds, Temple Run, Candy Crush Saga) ● In-app purchases in Double Star ● How many in-app items should you have? ● How do you call the player's attention to them? ● Pricing considerations

  22. Study Other Apps Temple Run 2 Angry Birds Candy Crush Saga

  23. Temple Run 2

  24. Angry Birds Screens - flow Screens - detail

  25. Angry Birds game flow Splash Games - 10+ settings / games Levels screens Storyline / Plot (one time) Tutorial - how to use slingshot (one time) Play Success (level cleared) Continue - next game, or back to levels Some points about Angry Birds: Big deal for success (lively, animated) Buttons for powerups are on Play screen, but only obvious after you press a button.

  26. Angry Birds - Splash

  27. Angry Birds game selection

  28. Angry Birds Levels

  29. Angry Birds Storyline

  30. Angry Birds Play

  31. Angry Birds Level Cleared

  32. Candy Crush Saga Screens - flow Screens - detail

  33. Candy Crush Saga Flow S plash Levels - depiction of your journey High Score - Level objectives To encourage Leaderboards To focus on goals To invite you to upgrade Instruction screen - with Skip button Play Status and score clearly displayed High Score - Level Objectives To remind about Leaderboards Levels Animation of progress Play new level or repeat an old one

  34. Candy Crush Saga - Splash

  35. Candy Crush Saga - Levels

  36. Candy Crush Saga - High Score / Levels

  37. Candy Crush Saga - Instruction Screen

  38. Candy Crush Saga - Play

  39. Candy Crush Saga - High Score / Objectives

  40. Temple Run 2

  41. My App: Double Star If you have enough gold coins, you can purchase extra equipment or improve your fighting capability.

  42. My App: Double Star In-app purchases, as an alternative to earning coins.

  43. Double Star - in-app upgrades … Still working on how to encourage players to upgrade. My plan is to use Candy Crush as the model. References: In-App Billing in a Space War Game

  44. Try Double Star Beta Test ● Distribute your app through Google Play ● Only your testers see the app and are allowed to install. ● When you go to production, ratings from Beta are gone. Installation You have to join a community. Join the Beta community on Google+. Click “Install app”. Then click “Become a tester” and “Download app”. Try it now: A link for your convenience is on my blog: blahti.wordpress.com

  45. Double Star Beta Community https://plus.google.com/u/0/communities/113741436953313178716 Join the Beta community on Google+. Then click “Install app”. Then click “Become a tester” and “Download app”.

  46. In-App Implementation in Double Star How I adapted Trivial Drive code … will be in Part 2 of my blog article. ● Understanding the code and methods that you use to make in-app purchases. ● Adding in-app billing code in a way that does not complicate your existing app code. ● Making it easy to track changes to the in-app billing code. ● Making design decisions about what in-app products to offer and how to present them to users. ● Information about the best practices the README authors mention related to security.

  47. In-App Purchases for an Android Game Bill Lahti Tridroid Meeting August 7, 2014 For Android tutorials and sample programs, visit blahti.wordpress.com

Recommend


More recommend