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

in app purchases for an android game
SMART_READER_LITE
LIVE PREVIEW

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,


slide-1
SLIDE 1

In-App Purchases for an Android Game

Bill Lahti Tridroid Meeting August 7, 2014

slide-2
SLIDE 2

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

Bill Lahti

slide-3
SLIDE 3
  • 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

Overview

slide-4
SLIDE 4

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

Example of In-App Purchases

slide-5
SLIDE 5

Trivial Drive

slide-6
SLIDE 6

Trivial Drive

slide-7
SLIDE 7

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.

In-App Purchases and Other Revenue Models

slide-8
SLIDE 8

https://www.youtube.com/watch?v=DJdx_Wd_EOo

Monetizing Android Apps

slide-9
SLIDE 9

https://plus.google.com/u/0/communities/113741436953313178716

In-App Purchases are doing well

slide-10
SLIDE 10

Trivial Drive demo app from Google Developers How does it work? How do you implement in- app billing?

A Sample App: Trivial Drive

slide-11
SLIDE 11

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

Trivial Drive Sample

slide-12
SLIDE 12

Reference: http://blahti.wordpress.com/2014/07/30/how-to-add-in-app-billing-in-android-part-1/

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.

slide-13
SLIDE 13

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

Tutorial Summary

slide-14
SLIDE 14

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

Study the Code

slide-15
SLIDE 15

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

  • nCreate of MainActivity
slide-16
SLIDE 16

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); } });

  • nCreate of MainActivity
slide-17
SLIDE 17

// 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); }

  • nCreate of MainActivity (continued)
slide-18
SLIDE 18

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); }

  • nBuyGasButtonClicked
slide-19
SLIDE 19

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.

Testing Trivial Drive

slide-20
SLIDE 20

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?

What do you do after Trivial Drive?

slide-21
SLIDE 21
  • 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

Design Considerations

slide-22
SLIDE 22

Temple Run 2 Angry Birds Candy Crush Saga

Study Other Apps

slide-23
SLIDE 23

Temple Run 2

slide-24
SLIDE 24

Screens - flow Screens - detail

Angry Birds

slide-25
SLIDE 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.

slide-26
SLIDE 26

Angry Birds - Splash

slide-27
SLIDE 27

Angry Birds game selection

slide-28
SLIDE 28

Angry Birds Levels

slide-29
SLIDE 29

Angry Birds Storyline

slide-30
SLIDE 30

Angry Birds Play

slide-31
SLIDE 31

Angry Birds Level Cleared

slide-32
SLIDE 32

Screens - flow Screens - detail

Candy Crush Saga

slide-33
SLIDE 33

Candy Crush Saga Flow

Splash

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

  • ne
slide-34
SLIDE 34

Candy Crush Saga - Splash

slide-35
SLIDE 35

Candy Crush Saga - Levels

slide-36
SLIDE 36

Candy Crush Saga - High Score / Levels

slide-37
SLIDE 37

Candy Crush Saga - Instruction Screen

slide-38
SLIDE 38

Candy Crush Saga - Play

slide-39
SLIDE 39

Candy Crush Saga - High Score / Objectives

slide-40
SLIDE 40

Temple Run 2

slide-41
SLIDE 41

If you have enough gold coins, you can purchase extra equipment or improve your fighting capability.

My App: Double Star

slide-42
SLIDE 42

In-app purchases, as an alternative to earning coins.

My App: Double Star

slide-43
SLIDE 43

… 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

Double Star - in-app upgrades

slide-44
SLIDE 44

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

Try Double Star

slide-45
SLIDE 45

Double Star Beta Community

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

slide-46
SLIDE 46

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
  • ffer and how to present them to users.
  • Information about the best practices the README

authors mention related to security.

In-App Implementation in Double Star

slide-47
SLIDE 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