Coder Social home page Coder Social logo

android-store-google-play's Introduction

This project is a billing provider plugin to android-store.

android-store-google-play

android-store-google-play is the default billing service plugin for android-store. It uses the default code given by Google which was adapted to IabHelper and IIabService interface so it'll be useful to SOOMLA's android-store.

Getting Started

In order to work with this plugin you first need to go over android-store's Getting Started.

The steps to integrate this billing service are also in android-store's Selecting Billing Service but we will also write them here for convenience:

  1. Add AndroidStoreGooglePlay.jar from the build folder to your project.
  2. Make the following changes in AndroidManifest.xml:

Add the following permission (for Google Play):

  <uses-permission android:name="com.android.vending.BILLING" />

Add the IabActivity to your application element, the plugin will spawn a transparent activity to make purchases. Also, you need to tell us what plugin you're using so add a meta-data tag for that:

  <activity android:name="com.soomla.store.billing.google.GooglePlayIabService$IabActivity"
    android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
  <meta-data android:name="billing.service" android:value="google.GooglePlayIabService" />
  1. After you initialize StoreController, let the plugin know your public key from the dev console:
  GooglePlayIabService.getInstance().setPublicKey("[YOUR PUBLIC KEY FROM THE MARKET]");
  1. If you want to allow the test purchases, all you need to do is tell that to the plugin:
  GooglePlayIabService.AllowAndroidTestPurchases = true;

For Google Play, We recommend that you open the IAB Service and keep it open in the background in cases where you have an in-game storefront. This is how you do that:

When you open the store, call:

  StoreController.getInstance().startIabServiceInBg();

When the store is closed, call:

  StoreController.getInstance().stopIabServiceInBg();

Contribution

We want you!

Fork -> Clone -> Implement -> Test -> Pull-Request. We have great RESPECT for contributors.

SOOMLA, Elsewhere ...

License

MIT License. Copyright (c) 2014 SOOMLA. http://soom.la

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.