Share
Embed
[Android 11 Meetups] Google Play Commerce からのアップデート / Android 11 Meetups Google Play Commerce
Android 11 Meetupsの「アプリ配信と収益化」で発表した資料です。
Android 11 Meetups - JP
https://developersonair.withgoogle.com/events/a11meetups-jp
Android11 Meetups - アプリ配信と収益化
https://gdg-tokyo.connpass.com/event/186603/
syarihu
August 25, 2020
Transcript
72 slides
-
Google Play Commerce からのアップデート Taichi Sato / syarihu Android Engineer
Money Forward Inc. -
定期購入に関する変更点 設定 現在 2020年11月1日以降 Account Hold デフォルト: OFF 必須 Restore
デフォルト: ON 必須 Pause デフォルト: OFF デフォルト: ON Resubscribe(新機能) デフォルト: OFF デフォルト: ON -
定期購入再購入 t1 t2 Is SKU returned in queryPurchases()? yes SUBSCRIPTION_IN_
GRACE_PERIOD Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 -
定期購入再購入 継続課金に失敗 猶予期間開始 t1 t2 Is SKU returned in queryPurchases()?
yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 Fields in server API, Purchase.subscriptions -
定期購入再購入 継続課金に失敗 猶予期間開始 猶予期間 (サービスは継続利用可能) t1 t2 Is SKU returned
in queryPurchases()? yes yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 t3 Fields in server API, Purchase.subscriptions -
定期購入再購入 継続課金に失敗 猶予期間開始 猶予期間 (サービスは継続利用可能) t1 t2 t3 Is SKU
returned in queryPurchases()? yes yes no 定期購入 自動キャンセル SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true SUBSCRIPTION _CANCELED SUBSCRIPTION _RENEWED 定期購入有効期間 Fields in server API, Purchase.subscriptions -
t1 t2 Is SKU returned in queryPurchases()? yes Real-time Developer
Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 -
猶予期間 (サービスは継続利用可能) t1 t2 t3 Is SKU returned in queryPurchases()?
yes yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true SUBSCRIPTION _ON_HOLD 継続課金に失敗 アカウントの一時停止開始 SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 継続課金に失敗 猶予期間開始 -
猶予期間 (サービスは継続利用可能) t1 t2 t3 Is SKU returned in queryPurchases()?
yes yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true アカウントの一時停止 (サービスは利用不可) expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true t4 no SUBSCRIPTION _ON_HOLD SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 継続課金に失敗 猶予期間開始 継続課金に失敗 アカウントの一時停止開始 -
猶予期間 (サービスは継続利用可能) t1 t2 t3 Is SKU returned in queryPurchases()?
yes yes no 定期購入 自動キャンセル SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true SUBSCRIPTION _CANCELED アカウントの一時停止 (サービスは利用不可) expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true t4 no SUBSCRIPTION _ON_HOLD SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 継続課金に失敗 猶予期間開始 継続課金に失敗 アカウントの一時停止開始 -
t1 Is SKU returned in queryPurchases()? yes Real-time Developer Notifications
Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t3) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 t3 -
解約予約期間 (この間は復元可能) t1 t2 t3 Is SKU returned in queryPurchases()?
yes yes SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t3) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 1 autoRenewing: false SUBSCRIPTION _EXPIRED SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 ユーザーが自発的に解約 (解約予約) -
解約予約期間 (この間は復元可能) t1 t2 t3 Is SKU returned in queryPurchases()?
yes yes SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t3) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 1 autoRenewing: false 定期購入解約 expiryTimeMillis: time of grace period end (t3) paymentState: 1 autoRenewing: false no SUBSCRIPTION _EXPIRED SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 ユーザーが自発的に解約 (解約予約) -
定期購入再購入 t1 Real-time Developer Notifications expiryTimeMillis: time of next renewal
(t4) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 Is SKU returned in queryPurchases()? yes t4 Fields in server API, Purchase.subscriptions yes 定期購入再購入 -
定期購入再購入 t1 t2 t4 SUBSCRIPTION _CANCELED Real-time Developer Notifications expiryTimeMillis:
time of next renewal (t4) paymentState: 1 autoRenewing: true expiryTimeMillis: time of subscription end (t4) paymentState: 1 autoRenewing: false SUBSCRIPTION _RENEWED 定期購入有効期間 Is SKU returned in queryPurchases()? yes yes SUBSCRIPTION _EXPIRED 解約予約期間 (この間は復元可能) ユーザーが自発的に解約 (解約予約) no 定期購入解約 Fields in server API, Purchase.subscriptions -
定期購入再購入 t1 t2 t4 SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields
in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t4) paymentState: 1 autoRenewing: true expiryTimeMillis: time of subscription end (t4) paymentState: 1 autoRenewing: false SUBSCRIPTION _RENEWED 定期購入有効期間 Is SKU returned in queryPurchases()? yes yes t3 SUBSCRIPTION _RESTARTED 解約予約を キャンセル SUBSCRIPTION _RENEWED expiryTimeMillis: time of next renewal (t4) paymentState: 1 autoRenewing: true 解約予約期間 (この間は復元可能) ユーザーが自発的に解約 (解約予約) yes -
(定期購入の再開) • 解約予約した定期購入の有効期限が切れる前 ◦ アプリ内から定期購入を再開する ◦ Google Play Subscriptions Centerから定期
購入を再開する(Restore) • 定期購入の有効期限が切れたあと ◦ Google Play Subscriptions Centerから最大1 年の間に同じSKUを再購入する -
有効期限が切れる前 Resubscribeではアプリ内からの再開となるため、 アプリ内に「再開」ボタンを設置する必要がある isAutoRenewingで解約予約中かを判別して導線 を表示する 考慮することが増えてしまうため、アプリ内に再開 導線を出すよりはGoogle Play Subscrition Center
を開くようにするのがおすすめ 詳細はこちら: developer.android.com/goo gle/play/billing/subs#deep- link -
有効期限が切れたあと Billing Library 2+を使用している場合、ユー ザーは定期購入の有効期限が切れてから最大 1年間、Google Play Subscriptions Centerから 定期購入を再購入できる
アプリの外部で行われるアプリ外購入となる サービス側でアプリ外購入を検知して、自社 サーバーで購入情報を処理できるようにしておく 必要がある -
定期購入再購入 t1 t2 Real-time Developer Notifications Fields in server API,
Purchase.subscription s expiryTimeMillis: time of next renewal (t2) autoResumeTimeMillis: n/a SUBSCRIPTION _RENEWED Is SKU returned in queryPurchases()? 定期購入 有効期間 -
定期購入再購入 t1 Real-time Developer Notifications Fields in server API, Purchase.subscription
s expiryTimeMillis: time of next renewal (t2) autoResumeTimeMillis: n/a SUBSCRIPTION _RENEWED Is SKU returned in queryPurchases()? SUBSCRIPTION_PAUSE_ SCHEDULE_CHANGE 定期購入 一時停止予約 定期購入 有効期間 expiryTimeMillis: time of pause start (t2) autoResumeTimeMillis: time of pause end (t3) t2 SUBSCRIPTION _CANCELED 定期購入 一時停止開始 -
定期購入再購入 t1 t2 SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in
server API, Purchase.subscription s expiryTimeMillis: time of next renewal (t2) autoResumeTimeMillis: n/a expiryTimeMillis: time of pause start (t2) autoResumeTimeMillis: time of pause end (t3) SUBSCRIPTION _RENEWED Is SKU returned in queryPurchases()? expiryTimeMillis: time of next renewal (t4) autoResumeTimeMillis: n/a SUBSCRIPTION_PAUSE_ SCHEDULE_CHANGE 定期購入 一時停止予約 t3 定期購入 有効期間 一時停止 (サービスは利用不可) 定期購入 一時停止開始 定期購入 有効期間 SUBSCRIPTION _RENEWED 一時停止終了 定期購入再購入 -
定期購入再購入 t1 t2 SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in
server API, Purchase.subscription s expiryTimeMillis: time of next renewal (t2) autoResumeTimeMillis: n/a expiryTimeMillis: time of pause start (t2) autoResumeTimeMillis: time of pause end (t3) SUBSCRIPTION _RENEWED Is SKU returned in queryPurchases()? expiryTimeMillis: time of pause start (t2) autoResumeTimeMillis: n/a SUBSCRIPTION_PAUSE_ SCHEDULE_CHANGE 定期購入 一時停止予約 t3 再購入に失敗 定期購入の一時停止終了 アカウントの一時停止開始 アカウントの一時停止 (サービスは利用不可) 定期購入の一時停止 (サービスは利用不可) 定期購入 一時停止開始 定期購入 有効期間 SUBSCRIPTION_ _ON_HOLD -
val params = BillingFlowParams.newBuilder() // Specify an obfuscated identifier to
uniquely identify the // user’s account. .setObfuscatedAccountId(obfuscatedAccountId) -
val params = BillingFlowParams.newBuilder() // Specify an obfuscated identifier to
uniquely identify the // user’s account. .setObfuscatedAccountId(obfuscatedAccountId) // Optionally, specify an obfuscated identifier to uniquely // identify the character profile with the user’s account. .setObfuscatedProfileId(obfuscatedProfileId) -
val params = BillingFlowParams.newBuilder() // Specify an obfuscated identifier to
uniquely identify the // user’s account. .setObfuscatedAccountId(obfuscatedAccountId) // Optionally, specify an obfuscated identifier to uniquely // identify the character profile with the user’s account. .setObfuscatedProfileId(obfuscatedProfileId) billingClient.launchBillingFlow(activity, params.build()) -
// After a successful purchase val accountIds = purchase.getAccountIdentifiers() accountIds.getObfuscatedAccountId()
accountIds.getObfuscatedProfileId() -
要件 June 3 Nov. 1 Aug. 2 Nov. 1 Billing
Library version requirements Billing Library 3 Launched New apps require Billing Library 3+ Updates require Billing Library 3+ 2020 2021 -
June 3 Nov. 1 Aug. 2 Nov. 1 Billing Library
version requirements Billing Library 3 Launched New apps require Billing Library 3+ Updates require Billing Library 3+ 2020 2021 All subscription apps require - Account hold - Restore By default, all subscription apps have - Pause - Resubscribe Subscription featurerequirem ents 要件