SlideShare una empresa de Scribd logo
1 de 62
digital currency, character upgrades


free-to-paid upgrades


periodicals, subscription games


expansion packs, custom content
developer.amazon.com/sdk.html
developer.amazon.com/sdk.html
developer.amazon.com/sdk.html
developer.amazon.com/sdk.html
Amazon Appstore In-App SDK


Purchasing Manager        Purchasing Observer
Amazon Appstore In-App SDK


    Purchasing Manager        Purchasing Observer




Sends messages to the In-App SDK
Amazon Appstore In-App SDK


    Purchasing Manager        Purchasing Observer




Receives messages from the In-App SDK
developer.amazon.com/sdk.html
can
are not
    is not
can not
are
    is not
can not
are
    is
strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="consumable_sku">com.amazon.buttonclicker.ten_clicks</string>
</resources>
strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="consumable_sku">com.amazon.buttonclicker.ten_clicks</string>
</resources>
AndroidManifest.xml
...
<receiver
 android:name=“com.amazon.inapp.purchasing.ResponseReceiver”>
  <intent-filter>
    <action
     android:name=“com.amazon.inapp.purchasing.NOTIFY”
  android:permission=“com.amazon.inapp.purchasing.Permission.NOTIFY”
  />
  </intent-filter>
<receiver>
...
Create a PurchasingObserver
ButtonClickerObserver.java

private class ButtonClickerObserver {

}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {

}
ButtonClickerObserver.java

private class ButtonClickerObserver
  extends BasePurchasingObserver {
  public ButtonClickerObserver() {
  }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
  extends BasePurchasingObserver {
  public ButtonClickerObserver(
    final ButtonClickerActivity buttonClickerActivity) {
  }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
  extends BasePurchasingObserver {
  public ButtonClickerObserver(
    final ButtonClickerActivity buttonClickerActivity) {
    super(ButtonClickerActivity);
  }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
  extends BasePurchasingObserver {
  public ButtonClickerObserver(
    final ButtonClickerActivity buttonClickerActivity) {
    super(ButtonClickerActivity);
    this.baseActivity = buttonClickerActivity;
  }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
  extends BasePurchasingObserver {
  public ButtonClickerObserver(
    final ButtonClickerActivity buttonClickerActivity) {
    super(ButtonClickerActivity);
    this.baseActivity = buttonClickerActivity;
  }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
  extends BasePurchasingObserver {
  public ButtonClickerObserver() {..} //code folding to save space
}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {
    }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {
      super.onSdkAvailable(isSandboxMode);
      Log.i(TAG, "Sdk is available!");
    }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {
      super.onSdkAvailable(isSandboxMode);
      Log.i(TAG, "Sdk is available!");
    }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}
}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}

    @Override
    public void onPurchaseResponse(
                 PurchaseResponse purchaseResponse) {
    }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}

    @Override
    public void onPurchaseResponse(
                 PurchaseResponse purchaseResponse) {
      Log.i(TAG, “Purchase Status = “ +
        purchaseResponse.getPurchaseStatus());
    }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}

    @Override
    public void onPurchaseResponse(
                 PurchaseResponse purchaseResponse) {
      Log.i(TAG, “Purchase Status = “ +
        purchaseResponse.getPurchaseStatus());
    }
}
ButtonClickerObserver.java

private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}

    @Override
    public void onPurchaseResponse(
                 PurchaseResponse purchaseResponse) {..}
}
Register the PurchasingObserver with the
PurchasingManager
ButtonClickerActivity.java

@Override
protected void onStart(){
  super.onStart();
}
ButtonClickerActivity.java

@Override
protected void onStart(){
  super.onStart();
  ButtonClickerObserver buttonClickerObserver
   = new ButtonClickerObserver(this);
}
ButtonClickerActivity.java

@Override
protected void onStart(){
  super.onStart();
  ButtonClickerObserver buttonClickerObserver
   = new ButtonClickerObserver(this);
  PurchasingManager.registerObserver(buttonClickerObserver);
}
Make sure IAP is available
Make sure IAP is available

                             Let’s just
                             pretend it
                             always is!
Make sure IAP is available

                             Let’s just
                             pretend it
                             always is!
Make sure IAP is available
Send a purchase request
ButtonClickerActivity.java

/*
* Called when our ‘purchase hint’ button is clicked
*/
public void onBuyMoreClicks(View view) {
}
ButtonClickerActivity.java

/*
* Called when our ‘purchase hint’ button is clicked
*/
public void onBuyMoreClicks(View view) {
  PurchasingManager.initiatePurchase(MY_SKU);
}
ButtonClickerActivity.java

/*
* Called when our ‘purchase hint’ button is clicked
*/
public void onBuyMoreClicks(View view) {
  PurchasingManager.initiatePurchase(MY_SKU);
}
Make sure IAP is available
Send a purchase request
Make sure IAP is available
Send a purchase request
Handle the response
ButtonClickerObserver.java
private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}

    @Override
    public void onPurchaseResponse(
                 PurchaseResponse purchaseResponse) {..}
}
ButtonClickerObserver.java
private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}

    @Override
    public void onPurchaseResponse(
                 PurchaseResponse purchaseResponse) {
      Log.i(TAG, “Purchase Status = “ +
        purchaseResponse.getPurchaseStatus());
    }
}
ButtonClickerObserver.java
private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}

    @Override
    public void onPurchaseResponse(
                 PurchaseResponse purchaseResponse) {
     Log.i(TAG, “Purchase Status = “ +
       purchaseResponse.getPurchaseStatus());

        if(purchaseResponse.getPurchaseRequestStatus() == PurchaseResponse.SUCCESSFUL){
            this.setNumClicks(this.getNumClicks() + 1);
        }
    }
}
ButtonClickerObserver.java
private class ButtonClickerObserver
 extends BasePurchasingObserver {
 public ButtonClickerObserver() {..} //code folding to save space

    @Override
    public void onSdkAvailable(boolean isSandboxMode) {..}

    @Override
    public void onPurchaseResponse(
                 PurchaseResponse purchaseResponse) {
     Log.i(TAG, “Purchase Status = “ +
       purchaseResponse.getPurchaseStatus());

        if(purchaseResponse.getPurchaseRequestStatus() == PurchaseResponse.SUCCESSFUL){
            this.setNumClicks(this.getNumClicks() + 1);
        }
    }
}
developer.amazon.com/sdk.html
We are sincerely eager to
 hear your feedback on this
presentation and on re:Invent.

 Please fill out an evaluation
   form when you have a
            chance.

Más contenido relacionado

La actualidad más candente

The Mouse is mightier than the sword
The Mouse is mightier than the swordThe Mouse is mightier than the sword
The Mouse is mightier than the sword
Priyanka Aash
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
Ting Lv
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
Yekmer Simsek
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Jon Kruger
 
Creating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of todayCreating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of today
gerbille
 

La actualidad más candente (20)

Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
 
Testable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptTestable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScript
 
The Mouse is mightier than the sword
The Mouse is mightier than the swordThe Mouse is mightier than the sword
The Mouse is mightier than the sword
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
Backbone js
Backbone jsBackbone js
Backbone js
 
Angular 2 introduction
Angular 2 introductionAngular 2 introduction
Angular 2 introduction
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
 
Graphql, REST and Apollo
Graphql, REST and ApolloGraphql, REST and Apollo
Graphql, REST and Apollo
 
Maven + Jsf + Richfaces + Jxl + Jdbc - Complete Code Example
Maven + Jsf + Richfaces + Jxl + Jdbc - Complete Code ExampleMaven + Jsf + Richfaces + Jxl + Jdbc - Complete Code Example
Maven + Jsf + Richfaces + Jxl + Jdbc - Complete Code Example
 
Why ruby
Why rubyWhy ruby
Why ruby
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Rails
 
WCLA12 JavaScript
WCLA12 JavaScriptWCLA12 JavaScript
WCLA12 JavaScript
 
Better Bullshit Driven Development [SeleniumCamp 2017]
Better Bullshit Driven Development [SeleniumCamp 2017]Better Bullshit Driven Development [SeleniumCamp 2017]
Better Bullshit Driven Development [SeleniumCamp 2017]
 
Basic Tutorial of React for Programmers
Basic Tutorial of React for ProgrammersBasic Tutorial of React for Programmers
Basic Tutorial of React for Programmers
 
Creating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of todayCreating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of today
 
Spring Framework - Expression Language
Spring Framework - Expression LanguageSpring Framework - Expression Language
Spring Framework - Expression Language
 
React, Redux and es6/7
React, Redux and es6/7React, Redux and es6/7
React, Redux and es6/7
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩
 

Similar a MBL205 Monetizing Your App on Kindle Fire - AWS re: Invent 2012

Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
wpnepal
 
Droidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon2013 android experience lahoda
Droidcon2013 android experience lahoda
Droidcon Berlin
 
Javascript Frameworks for Joomla
Javascript Frameworks for JoomlaJavascript Frameworks for Joomla
Javascript Frameworks for Joomla
Luke Summerfield
 

Similar a MBL205 Monetizing Your App on Kindle Fire - AWS re: Invent 2012 (20)

Inversion Of Control
Inversion Of ControlInversion Of Control
Inversion Of Control
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript Functions
 
Improving android experience for both users and developers
Improving android experience for both users and developersImproving android experience for both users and developers
Improving android experience for both users and developers
 
Droidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon2013 android experience lahoda
Droidcon2013 android experience lahoda
 
Fórum de Software Livre do Serpro RJ 2009
Fórum de Software Livre do Serpro RJ 2009Fórum de Software Livre do Serpro RJ 2009
Fórum de Software Livre do Serpro RJ 2009
 
JavaScript Fundamentals with Angular and Lodash
JavaScript Fundamentals with Angular and LodashJavaScript Fundamentals with Angular and Lodash
JavaScript Fundamentals with Angular and Lodash
 
Patterns Are Good For Managers
Patterns Are Good For ManagersPatterns Are Good For Managers
Patterns Are Good For Managers
 
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
 
A new execution model for Nashorn in Java 9
A new execution model for Nashorn in Java 9A new execution model for Nashorn in Java 9
A new execution model for Nashorn in Java 9
 
The uniform interface is 42
The uniform interface is 42The uniform interface is 42
The uniform interface is 42
 
Webpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San FranciscoWebpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San Francisco
 
Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScript
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrap
 
Javascript Frameworks for Joomla
Javascript Frameworks for JoomlaJavascript Frameworks for Joomla
Javascript Frameworks for Joomla
 
Marvel of Annotation Preprocessing in Java by Alexey Buzdin
Marvel of Annotation Preprocessing in Java by Alexey BuzdinMarvel of Annotation Preprocessing in Java by Alexey Buzdin
Marvel of Annotation Preprocessing in Java by Alexey Buzdin
 
購物車程式架構簡介
購物車程式架構簡介購物車程式架構簡介
購物車程式架構簡介
 
Single page webapps & javascript-testing
Single page webapps & javascript-testingSingle page webapps & javascript-testing
Single page webapps & javascript-testing
 
CodingSerbia2014-JavaVSPig
CodingSerbia2014-JavaVSPigCodingSerbia2014-JavaVSPig
CodingSerbia2014-JavaVSPig
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 

Más de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Más de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

MBL205 Monetizing Your App on Kindle Fire - AWS re: Invent 2012