资源简介
Google Play Billing Library,不知道为什么android sdk manager下不到了。我找了一下贴了出来,这个里面包含了IInAppBillingService.aidl,和谷歌写的一整套util,其中包括IabHelper.java等的9个文件。解压出来放在对应的\extras\google 下面。
代码片段和文件信息
/* Copyright (c) 2012 Google Inc.
*
* Licensed under the Apache License Version 2.0 (the “License“);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.android.trivialdrivesample;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import com.example.android.trivialdrivesample.util.IabHelper;
import com.example.android.trivialdrivesample.util.IabResult;
import com.example.android.trivialdrivesample.util.Inventory;
import com.example.android.trivialdrivesample.util.Purchase;
/**
* Example game using in-app billing version 3.
*
* Before attempting to run this sample please read the README file. It
* contains important information on how to set up this project.
*
* All the game-specific logic is implemented here in MainActivity while the
* general-purpose boilerplate that can be reused in any app is provided in the
* classes in the util/ subdirectory. When implementing your own application
* you can copy over util/*.java to make use of those utility classes.
*
* This game is a simple “driving“ game where the player can buy gas
* and drive. The car has a tank which stores gas. When the player purchases
* gas the tank fills up (1/4 tank at a time). When the player drives the gas
* in the tank diminishes (also 1/4 tank at a time).
*
* The user can also purchase a “premium upgrade“ that gives them a red car
* instead of the standard blue one (exciting!).
*
* The user can also purchase a subscription (“infinite gas“) that allows them
* to drive without using up any gas while that subscription is active.
*
* It‘s important to note the consumption mechanics for each item.
*
* PREMIUM: the item is purchased and NEVER consumed. So after the original
* purchase the player will always own that item. The application knows to
* display the red car instead of the blue one because it queries whether
* the premium “item“ is owned or not.
*
* INFINITE GAS: this is a subscription and subscriptions can‘t be consumed.
*
* GAS: when gas is purchased the “gas“ item is then owned. We consume it
* when we apply that item‘s effects to our app‘s world which to us means
* filling up 1/4 of the tank. This happens immediately after purchase!
* It‘s at this point (and not when the user drives) that the “gas“
* item is CONSUMED. Consumption should always happen when your game
* world wa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-01-31 15:26 play_billing\
文件 6148 2014-07-02 13:07 play_billing\.DS_Store
文件 8443 2013-11-09 01:03 play_billing\IInAppBillingService.aidl
文件 55191 2013-11-09 01:03 play_billing\market_billing_r02.zip
文件 4407 2013-11-09 01:03 play_billing\README
目录 0 2018-01-31 15:26 play_billing\samples\
文件 6148 2014-07-02 13:07 play_billing\samples\.DS_Store
目录 0 2018-01-31 15:26 play_billing\samples\TrivialDrive\
文件 6148 2014-07-02 13:07 play_billing\samples\TrivialDrive\.DS_Store
文件 1632 2013-11-09 01:03 play_billing\samples\TrivialDrive\AndroidManifest.xm
目录 0 2018-01-31 15:26 play_billing\samples\TrivialDrive\libs\
文件 349252 2013-11-09 01:03 play_billing\samples\TrivialDrive\libs\android-support-v4.jar
文件 563 2013-11-09 01:03 play_billing\samples\TrivialDrive\project.properties
文件 4407 2013-11-09 01:03 play_billing\samples\TrivialDrive\README
目录 0 2018-01-31 15:26 play_billing\samples\TrivialDrive\res\
文件 12292 2014-07-02 13:07 play_billing\samples\TrivialDrive\res\.DS_Store
目录 0 2018-01-31 15:26 play_billing\samples\TrivialDrive\res\drawable-hdpi\
文件 3120 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-hdpi\ic_action_search.png
文件 1212 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-hdpi\ic_launcher.png
目录 0 2018-01-31 15:26 play_billing\samples\TrivialDrive\res\drawable-ldpi\
文件 965 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-ldpi\ic_launcher.png
目录 0 2018-01-31 15:26 play_billing\samples\TrivialDrive\res\drawable-mdpi\
文件 3030 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-mdpi\ic_action_search.png
文件 1028 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-mdpi\ic_launcher.png
目录 0 2018-01-31 15:26 play_billing\samples\TrivialDrive\res\drawable-xhdpi\
文件 640 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-xhdpi\buy_gas.png
文件 632 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-xhdpi\drive.png
文件 1086 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-xhdpi\free.png
文件 575 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-xhdpi\gas0.png
文件 584 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-xhdpi\gas1.png
文件 567 2013-11-09 01:03 play_billing\samples\TrivialDrive\res\drawable-xhdpi\gas2.png
............此处省略47个文件信息
- 上一篇:2017黑马java基础班+就业班
- 下一篇:Java高并发精讲云盘
相关资源
- JAVALibrary
- Android Support Library v23
- android support library 最新版本(v23.2.0)
- android support library 24.0.1(最近更新)
- 仿驾校一点通添加了引用的library文件
-
Android MediaPla
yer在线音乐播放器 -
Android应用开发mediapla
yer播放音频, - Android Support Library 23.2官网
- 融云即时通讯library \“libsqlite.so\“
- 一个非常经典的android音乐播放器代码
- Android v7 appcompat library
-
android VideoPla
yerJieCao -
ijkpla
yer_demo.apk - airscreen miracast TV BOX
-
Android下MediaPla
yer播放MP3 - Android support Library 官方绿色版
- Java 万能播放器带源码
- Android support Library 官方绿色
- Android support Library 显示方法
-
android MediaPla
yer+SurfaceView实现播放 - Native Hadoop3.2.1 Library 64位编译
- JspLibrary.zip
-
play fr
amework 框架手册 word 版 - java图书管理系统mysql数据库
- Android Support Percent Library
- 在Android平台上的playfair以及hill加密解
- google play store
- google play services 总包
- 简单的音乐播放器 Android studio项目
-
Android 中MediaPla
yer使用详解源码
评论
共有 条评论