Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Androidアプリ内課金のテスト
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
takuaraki
March 01, 2019
Technology
500
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Androidアプリ内課金のテスト
takuaraki
March 01, 2019
More Decks by takuaraki
See All by takuaraki
2021/02/03 発覚の COCOA Android版 不具合について
takuaraki
0
71
GASでSlackBot
takuaraki
1
580
Material Design Guideline: Dialogs, Dividers
takuaraki
0
450
Material Design Guideline: Bottom components
takuaraki
0
540
App Shortcuts
takuaraki
0
410
[関モバ#18] SQLBrite&SQLDelight
takuaraki
0
500
A/B testing GTM&GA vs Firebase
takuaraki
1
3k
【関モバ#12】Google Tag ManagerでモバイルアプリのABテストをする
takuaraki
1
690
Other Decks in Technology
See All in Technology
データ品質を壊しながらSnowflakeのAIに分析させてみた
kawanago
0
320
可視化から始めたAI駆動開発_ochi_ver1.01 / AI-Driven Development Starting with Visualization_ver1.01
yayoi_dd
0
110
AIエージェントを安全で速い現場監督にする:Jev・Obsidian・メタハーネス
x5gtrn
PRO
0
140
Meet AgentCore Identity Consent Portal
hironobuiga
2
140
MCPゲートウェイを作って運用してわかったこと — Agent時代の権限管理の現在地
mtpooh
6
1.3k
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
220
覗いてみよう 関数型ビジュアル言語×2Dグラフィックスの世界
yohyamasaki
0
150
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
450
Harness Engineering on Rails
joelq
0
760
AIエージェント時代のPlatform as a Product —— テックリードがPdMとして回す発見・導入・計測 / Platform as a Product in the AI Agent Era
toshi0607
1
530
Argo CDとAtlantisで実現するインフラ管理のセルフサービス化──小規模SREチームで支えるプラットフォーム
cassius7
0
250
Apache Iceberg が拓く AI 時代のオープンレイクハウス
tomtanaka
0
190
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Odyssey Design
rkendrick25
PRO
2
840
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
250
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
690
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Become a Pro
speakerdeck
PRO
31
6.3k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
410
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
380
Transcript
ΞϓϦ՝ۚͷςετ 2019/03/01 @ara_tack
ʢߥʣ !BSB@UBDL '63:6$PSQPSBUJPO
͜ͷൃදʹ͍ͭͯ • Androidͷ՝ۚͷجૅ • ՝ۚͷಓͷΓ • ্ख͘՝͕ۚͰ͖ͳ͍ͱ͖ʁ • Play StoreΛΘͣʹಈ࡞֬ೝ
(billingx) • ৄࡉͳ՝ۚͷ࣮ʹ͍ͭͯ͞ͳ͍
AndroidΞϓϦ՝ۚ Google Play ΞϓϦͱΓऔΓ͍ͯ͠Δ (PPHMF1MBZ "QQ .Z"QQ 8SBQQFS 1MBZ#JMMJOH-JCSBSZ *O"QQ#JMMJOH"1*
ߪೖͰ͖Δͷछྨ • One-time products: 1ճ͚ͩߪೖͰ͖Δ • Subscriptions: ఆظߪೖ
One-time products • 1ճ͚ͩߪೖͰ͖Δ • ΞΠςϜػೳΛߪೖ͢Δͷʹ͍͍ͯΔ
Subscriptions • ఆظߪೖΞΠςϜ • Ұఆظؒ͝ͱʹࢧ͍͕ൃੜ͢Δ • ձһαʔϏεͳͲʹΘΕΔ
՝ۚͷಓͷΓ • Developerొ • ΞϓϦΛPlay ConsoleʹΞοϓϩʔυ͢Δ • Play ConsoleͰΞΠςϜͷొΛ͢Δ
Developerొ • GoogleΞΧϯτΛ༻ҙ͢Δ • $25͏ • Google Play Console͕͑ΔΑ͏ʹͳΔ
ΞϓϦΛPlay Consoleʹ্͛Δ • ϦϦʔεϏϧυͷΞϓϦ͕ඞཁ • ূ໌ॻϦϦʔε࣌ͷͷΛར༻ • Billingͷύʔϛογϣϯ͕ඞཁ • ެ։͕ඞཁʢΫϩʔζ൛ͰΑ͍ʣ
ΞϓϦΛPlay Consoleʹ্͛Δ ςετ༻ͷΞϓϦʹ͍ͭͯ • ΞϓϦέʔγϣϯIDূ໌ॻΛϦϦʔε༻ͱ ߹ΘͤΔ • ςετ༻ͷผΞϓϦͱͯ͠Play Consoleʹ͋ ͛ΔͷOK
ΞϓϦΛPlay Consoleʹ্͛Δ // flavorDimensionsলུ productFlavors { product { applicationId =
APPLICATION_ID_PRODUCT } billingTest { applicationId = APPLICATION_ID_PRODUCT } develop { applicationId = APPLICATION_ID_STAGING } } sourceSets { // resΛςετܥͷͷʹ͢Δ!ςετܥͷAPIΛ͑ΔΑ͏ʹ͢Δ billingTest.res.srcDirs = ["src/develop/res"] }
ͷొΛ͢Δ
ͷొΛ͢Δ • ID: มߋෆՄ • λΠτϧͱઆ໌จɿมߋՄೳ • Ձ֨ɿมߋՄೳ • ٻରظؒɿSubscriptionsͷΈɻมߋෆՄɻि
ؒɺ݄ผɺ3͔݄ɺ6͔݄ɺؒ • εςʔλεɿ༗ޮʹ͢ΔͱআͰ͖ͳ͘ͳΔ
None
ςετΞΧϯτ • Google Play ConsoleͰςετΞΧϯτ͕ొ Ͱ͖Δ • ςετΞΧϯτͰແྉͰ՝ۚͰ͖Δ • ࣮ࡍͷPlay
StoreͰͷߪೖͱѻ͍Ұॹɻߪೖ ใಉ͡ɻஈͱߪಡظ͚͕ؒͩҟͳΔɻ
ςετΞΧϯτ Subscriptions ͷߪಡظؒ https://developer.android.com/google/play/billing/billing_testing ΑΓҾ༻
ςετΞΧϯτ
্ख͘՝͕ۚͰ͖ͳ͍ͱ͖ʁ • ΞϓϦʹBillingͷύʔϛογϣϯ͕ͳ͍ • Play Consoleʹ্͕͍ͬͯͳ͍ • ΞϓϦͷূ໌ॻ͕Play Consoleʹ্͍͛ͯΔͷͱ ҟͳΔ
• ͕༗ޮʹͳ͍ͬͯͳ͍ • σϕϩούʔΞΧϯτͳͷͰ՝ۚͰ͖ͳ͍
Play StoreΛΘͣʹςετ Play StoreͷϞοΫϨεϙϯεΛఏڙ͢Δ ϥΠϒϥϦ • pixiteapps/billingx • NYTimes/Register
billingx • Play Billing LibraryΛϞοΫԽͰ͖Δ • DebugBillingClientΛBillingClientͱͯ͠͏
billingx ༻ྫʣBillingClientFactoryΛ࡞ͬͯDI͢Δ // BillingClient ͷϑΝΫτϦΛఆٛ interface BillingClientFactory { fun createBillingClient(activity:
Activity, updateListener: PurchasesUpdatedListener): BillingClient }
billingx ༻ྫʣBillingClientFactoryΛ࡞ͬͯDI͢Δ // ຊ൪༻ Play Billing Library ͷ BillingClient Λฦ͢
class ReleaseBillingClientFactory : BillingClientFactory { override fun createBillingClient(activity: Activity, updateListener: PurchasesUpdatedListener): BillingClient { return BillingClient .newBuilder(activity) .setListener(updateListener) .build() } }
billingx ༻ྫʣBillingClientFactoryΛ࡞ͬͯDI͢Δ // σόοά༻ DebugBillingClient Λฦ͢ class DebugBillingClientFactory : BillingClientFactory
{ override fun createBillingClient(activity: Activity, updateListener: PurchasesUpdatedListener): BillingClient { initializeData(activity) return DebugBillingClient(activity, updateListener) } } private fun initializeData(activity: Activity) { // ϞοΫσʔλΛ४උʢ࣍εϥΠυࢀরʣ }
billingx ༻ྫʣBillingClientFactoryΛ࡞ͬͯDI͢Δ private fun initializeData(activity: Activity) { BillingStore.defaultStore(activity) .clearProducts() .addProduct(
SkuDetailsBuilder( sku = BillingManager.SKU_SUBS, type = BillingClient.SkuType.SUBS, price = "$9.99", priceAmountMicros = 9990000, priceCurrencyCode = "USD", title = "Premium Access", description = "Get all the super cool features.", subscriptionPeriod = "p1m", freeTrialPeriod = "p1w" ).build() ) }
billingx ༻ྫʣBillingClientFactoryΛ࡞ͬͯDI͢Δ @Module class BillingClientFactoryModule { @Provides fun provideBillingClientFactory(): BillingClientFactory
{ return if (BuildConfig.DEBUG) { DebugBillingClientFactory() } else { ReleaseBillingClientFactory() } } }
·ͱΊ • ՝ۚͷͨΊʹPlay Consoleͷઃఆ͕ඞཁ • ՝ۚςετ࣌ʹϋϚΓϙΠϯτ͕ଟ͍ • Play Storeແ͠Ͱಈ࡞֬ೝ͢Δํ๏͋Δ