Upgrade to Pro — share decks privately, control downloads, hide ads and more …

みてねのAndroid課金開発環境 / Android In-App Purchase Environment

みてねのAndroid課金開発環境 / Android In-App Purchase Environment

Cf724b865a0a76fa7183b70b3b2b208a?s=128

satoru.sasaki

May 20, 2019
Tweet

Transcript

  1. ΈͯͶͷ "OESPJE՝ۚ։ൃ؀ڥ ΈͯͶͷ.FFUVQܾࡁΛࢧ͑Δٕज़  גࣜձࣾϛΫγΟΈͯͶࣄۀ෦ ࠤʑ໦ڿ!DBBE IUUQTCJUMZ70.'K+

  2. ࣗݾ঺հ ࠤʑ໦ڿ !DBBE  ೥݄ೖࣾ ೥݄4/4NJYJΈͯͶʹҠಈ

  3. ࠓ೔࿩͢͜ͱ w "OESPJEʹ͓͚Δ՝ۚʹ͍ͭͯ w ΈͯͶͷ"OESPJE։ൃ؀ڥʹ͍ͭͯ w ಋೖखॱ w ΍͓͍ͬͯͨํ͕Α͍͜ͱ w

    ͓·͚ w ·ͱΊ
  4. "OESPJEʹ͓͚Δ՝ۚʹ͍ͭͯ

  5. wΞϓϦ಺՝ۚ͸(PPHMFͱͷ΍ΓऔΓ ͢Δ w1MBZ$POTMFͱ࿈ܞ͢ΔͨΊొ࿥͞Εͨ ύοέʔδͰͳ͚Ε͹՝ۚػೳ͸࢖͑ͳ ͍ "OESPJEʹ͓͚Δ՝ۚʹ͍ͭͯ

  6. ΈͯͶͷ"OESPJE։ൃ؀ڥʹ͍ͭͯ

  7. ΈͯͶͷ։ൃ؀ڥ wݸਓ؀ڥ͸আ͖ɺେ·͔ʹ̏ͭͷ؀ڥ

  8. ΈͯͶͷ։ൃ؀ڥ wݸਓ؀ڥ͸আ͖ɺେ·͔ʹ̏ͭͷ؀ڥ

  9. ΈͯͶͷ։ൃ؀ڥ wݸਓ؀ڥ͸আ͖ɺେ·͔ʹ̏ͭͷ؀ڥ

  10. ΈͯͶͷ։ൃ؀ڥ wݸਓ؀ڥ͸আ͖ɺେ·͔ʹ̏ͭͷ؀ڥ

  11. w ֤؀ڥ͝ͱʹΞϓϦΛ࡞੒ w ՝ۚΛ༗ޮʹ͢Δ w ςετ՝ۚͰ͖ΔΑ͏ʹ͢Δ w ࣮૷͢Δ ಋೖखॱ

  12. w ֤؀ڥ͝ͱʹΞϓϦΛ࡞੒ w ՝ۚΛ༗ޮʹ͢Δ w ςετ՝ۚͰ͖ΔΑ͏ʹ͢Δ w ࣮૷͢Δ ࣮૷·Ͱͷखॱ

  13. ՝ۚ࣌ͷཧ૝ wखݩͷϏϧυɾ%FQMPZ(BUF഑৴ͨ͠ΞϓϦͰςετ՝͍ۚͨ͠

  14. ֤؀ڥ͝ͱʹΞϓϦΛ࡞੒

  15. ֤؀ڥ͝ͱʹΞϓϦΛ࡞੒ wEFWFMPQͱTUBUJOH͸શମެ։͠ͳ͍લఏ

  16. wϝϦοτ w΍Β͔͕͠ڐ͞ΕΔ wࣦഊΛؾʹͤͣ͋Δఔ౓޷͖ʹͰ͖Δ wച্Ϩϙʔτ͕ςετ؀ڥͱผʹͳΔ wσϝϦοτ w͏͔ͬΓશମެ։ͯ͠͠·͏ڪΕ͋Γ wಉ͡ઃఆΛ֤؀ڥʹ൓ө͢Δඞཁ͕͋Δ ΞϓϦΛ෼͚Δ͜ͱͷϝϦοτɾσϝϦοτ

  17. w ֤؀ڥ͝ͱʹΞϓϦΛ࡞੒ w ՝ۚΛ༗ޮʹ͢Δ w ςετ՝ۚͰ͖ΔΑ͏ʹ͢Δ w ࣮૷͢Δ ࣮૷·Ͱͷखॱ

  18. #JMMJOH-JCSBSZΛؚΉBQLΛ1MBZ4UPSFʹެ։͢Δ ՝ۚΛ༗ޮʹ͢ΔͨΊʹ͢Δ͜ͱ

  19. ᶃ#JMMJOH-JCSBSZ௥Ճͯ͠Ϗϧυ ᶄ1MBZ$POTPMFʹBQLΞοϓϩʔυ ᶅ1MBZ$POTPMFͰఆظߪೖΞΠςϜ࡞੒ ᶆΫϩʔζυΞϧϑΝͰެ։ ՝ۚΛ༗ޮʹ͢ΔͨΊʹ͢Δ͜ͱ

  20. ᶃ#JMMJOH-JCSBSZ௥Ճͯ͠Ϗϧυ ᶄ1MBZ$POTPMFʹBQLΞοϓϩʔυ ᶅΫϩʔζυΞϧϑΝͰެ։ ᶆ1MBZ$POTPMFͰఆظߪೖΞΠςϜ࡞੒ ՝ۚΛ༗ޮʹ͢ΔͨΊʹ͢Δ

  21. ᶃ#JMMJOH-JCSBSZ௥Ճͯ͠Ϗϧυ ᶄ1MBZ$POTPMFʹBQLΞοϓϩʔυ ᶅΫϩʔζυΞϧϑΝͰެ։ ᶆ1MBZ$POTPMFͰఆظߪೖΞΠςϜ࡞੒ ՝ۚΛ༗ޮʹ͢ΔͨΊʹ͢Δ

  22. ᶃ#JMMJOH-JCSBSZ௥Ճͯ͠Ϗϧυ ᶄ1MBZ$POTPMFʹBQLΞοϓϩʔυ ᶅΫϩʔζυΞϧϑΝͰެ։ ᶆ1MBZ$POTPMFͰఆظߪೖΞΠςϜ࡞੒ ՝ۚΛ༗ޮʹ͢ΔͨΊʹ͢Δ

  23. ᶃ#JMMJOH-JCSBSZ௥Ճͯ͠Ϗϧυ ᶄ1MBZ$POTPMFʹBQLΞοϓϩʔυ ᶅΫϩʔζυΞϧϑΝͰެ։ ᶆ1MBZ$POTPMFͰఆظߪೖΞΠςϜ࡞੒ ՝ۚΛ༗ޮʹ͢ΔͨΊʹ͢Δ

  24. w ֤؀ڥ͝ͱʹΞϓϦΛ࡞੒ w ՝ۚΛ༗ޮʹ͢Δ w ςετ՝ۚͰ͖ΔΑ͏ʹ͢Δ w ࣮૷͢Δ ࣮૷·Ͱͷखॱ

  25. wެࣜʹΑΔͱ ςετߪೖ ςετߪೖ͸ɺಛఆͷϥΠηϯε ςετ Ϣʔβʔ͕՝ۚΛ ൐ΘͣʹΞϓϦ಺ΞΠςϜΛߪೖͰ͖Δํ๏Ͱ͢ɻςετߪ ೖ͸ΞϧϑΝ൛ɺϕʔλ൛ϦϦʔεʹରͯ͠ͷΈՄೳͰ͢ɻ

  26. wͭ·Γɺςετߪೖ͢Δʹ͸ɺɺ ςετߪೖ

  27. wͭ·Γɺςετߪೖ͢Δʹ͸ɺɺ ςετߪೖ ςελʔ ϥΠηϯε ςετ Ϣʔβʔ ʹͳΔඞཁ͕͋Δ

  28. wςελʔ wΞϧϑΝ൛ɾϕʔλ൛ΛHPPHMFQMBZTUPSF͔ΒऔಘͰ͖Δ wϥΠηϯεςετϢʔβ wςετߪೖ͕ڐՄ͞ΕͨϢʔβ ςελʔͱϥΠηϯεςετϢʔβ ΞϓϦϥΠηϯεΛ࢖༻ͨ͠ΞϓϦ಺՝ۚͷςετ https://support.google.com/googleplay/android-developer/answer/6062777?hl=ja ΞϓϦϥΠηϯε https://developer.android.com/google/play/licensing/overview.html

  29. w1MBZ$POTPMFͷΞϓϦμογϡϘʔυ͔Βςελʔ௥Ճ wΦϓτΠϯ63-ʹΞΫηε ςελʔʹͳΔ https://play.google.com/apps/testing/<package>

  30. w1MBZ$POTPMFઃఆΞΧ΢ϯτͷৄࡉϥΠηϯεςετ wΞΧ΢ϯτ௥Ճ ϥΠηϯεςετϢʔβʔʹͳΔ

  31. wखݩͷϏϧυͰςετߪೖͰ͖ΔΑ͏ʹͳΔ w(PPHMF1MBZ͔ΒΞϧϑΝ൛ΛΠϯετʔϧ͠ͳͯ͘΋Α͍ ςετߪೖͰ͖·͢

  32. ςετߪೖͱຊߪೖ

  33. ςετߪೖͰগ͠ϋϚΔ͜ͱ

  34. ςετߪೖͰগ͠ϋϚΔ͜ͱ ొ࿥͢ΔΞΧ΢ϯτ͸ϓϥΠϚϦΞΧ΢ϯτͰ͋Δ͜ͱ

  35. ςετߪೖͰগ͠ϋϚΔ͜ͱ wϓϥΠϚϦΞΧ΢ϯτ w"OESPJE͸Ұͭͷ୺຤ʹෳ਺ΞΧ΢ϯτΛొ࿥͢ Δ͜ͱ͕Ͱ͖Δ wΞϓϦ಺՝ۚʹ࢖͏ΞΧ΢ϯτ͸࠷ॳʹొ࿥ͨ͠ ΞΧ΢ϯτͱͳ͍ͬͯΔ ϓϥΠϚϦΞΧ΢ϯτ  wͭ·ΓɺΞϧϑΝ൛΍ςετߪೖ͢Δʹ͸ɺϓϥ ΠϚϦΞΧ΢ϯτΛొ࿥͠ͳ͍ͱςετ՝ۚͰ͖

    ͳ͍
  36. ςετߪೖͰগ͠ϋϚΔ͜ͱ ςετߪೖ͍ͨ͠ΞΧ΢ϯτ cc ୺຤ʹ࠷ॳʹొ࿥͢ΔΞΧ΢ϯτ wͭ·Γ

  37. w ֤؀ڥ͝ͱʹΞϓϦΛ࡞੒ w ՝ۚΛ༗ޮʹ͢Δ w ςετ՝ۚͰ͖ΔΑ͏ʹ͢Δ w ࣮૷͢Δ ࣮૷·Ͱͷखॱ

  38. ௐࠪͱ͔ࢀߟʹͨ͠΋ͷ wϥΠϒϥϦ w#JMMJOH$MJFOU-JCSBSZW ࠷ۙWϦϦʔε͞Εͨ  wࢀߟʹͨ͠΋ͷ wެࣜυΩϡϝϯτ w(PPHMFͷαϯϓϧɺྫͷΞϨ 5SJWJBM%SJWF@W 

    w%SPJE,BJHJৄղఆظߪೖ Droidkaigi 2019 ৄղఆظߪೖ (΍·Μͩʔ @ymnd ͞Μ) https://developer.android.com/google/play/billing/billing_testing?hl=ja#solo TrivalDrive_v2 https://developer.android.com/google/play/billing/billing_library_overview
  39. ઃܭ wΑ͋͘ΔΞϨ w.77. wࠓճ͸ɺ#JMMJOH$MJFOUΛѻ͏%BUB4PVSDFʹ ͍ͭͯগ͚ͩ͠

  40. ઃܭ wΑ͋͘ΔΞϨ w.77. wࠓճ͸ɺ#JMMJOH$MJFOUΛѻ͏%BUB4PVSDFʹ ͍ͭͯগ͚ͩ͠

  41. ઃܭ wΑ͋͘ΔΞϨ w.77. wࠓճ͸ɺ#JMMJOH$MJFOUΛѻ͏%BUB4PVSDFʹ ͍ͭͯগ͚ͩ͠

  42. %BUB4PVSDF w#JMMJOH-JCSBSZΛ3Y+BWBͰϥοϐϯά wҰ෦ϨεϙϯείʔϧόοΫ෦෼Ͱ໘౗ͳ "1*͕͋ͬͨ w$BMMCBDL͸ϝΠϯεϨουͰͷ࣮ߦ͕ඞਢ w(JTUࢀরͯ͠Έ͍ͯͩ͘͞ Google ͷ੩తϨεϙϯε͕͋ΔͷͰɺΞΠςϜͳͯ͘΋୯ମςετ͸Ͱ͖·͢ https://developer.android.com/google/play/billing/billing_testing?hl=ja#solo Gist

    https://gist.github.com/caad1229/a6aea2e863b87074e5cf29e13504fcff
  43. w ֤؀ڥ͝ͱʹΞϓϦΛ࡞੒ w ՝ۚΛ༗ޮʹ͢Δ w ςετ՝ۚͰ͖ΔΑ͏ʹ͢Δ w ࣮૷͢Δ ࣮૷·Ͱͷखॱ

  44. ΍͓͍ͬͯͨ΄͏͕ྑ͍͜ͱ

  45. 4FSWFSͰϨγʔτݕূͯ͠΋Β͏ wߪೖϋοΫ͢Δ'SFFEPNͱ-VDLZ1BUDIFSͱ͍ͬͨΞϓϦ͕͋Δ wϨγʔτݕূ͸4FSWFSʹ೚ͤΔ͜ͱͰɺෆਖ਼Λ๷͙͜ͱ͕Ͱ͖Δ wΈͯͶͰ΋਺݅ɺෆਖ਼Ϩγʔτ͕͋ͬͨ w($1αʔϏεΞΧ΢ϯτ͸1MBZ$POTPMFͱ࿈ܞ͍ͯ͠Δඞཁ͕͋Δ

  46. 4FSWFSͰϨγʔτݕূͯ͠΋Β͏ wߪೖϋοΫ͢Δ'SFFEPNͱ-VDLZ1BUDIFSͱ͍ͬͨΞϓϦ͕͋Δ wϨγʔτݕূ͸4FSWFSʹ೚ͤΔ͜ͱͰɺෆਖ਼Λ๷͙͜ͱ͕Ͱ͖Δ wΈͯͶͰ΋਺݅ɺෆਖ਼Ϩγʔτ͕͋ͬͨ w($1αʔϏεΞΧ΢ϯτ͸1MBZ$POTPMFͱ࿈ܞ͍ͯ͠Δඞཁ͕͋Δ ޻਺͸͔͔Δ͕ɺ͋ͬͨ΄͏͕ྑ͍

  47. ߪೖ෮ؼॲཧ w(PPHMFɾΈͯͶΞϓϦɾ4FSWFSͰͷ੔߹ੑ͕औΕͳ͔ͬͨ৔߹ͷରԠ

  48. ͓·͚

  49. ։ൃ༻ΞϓϦͷϦδΣΫτ w(PPHMF͔Β։ൃ༻ΞϓϦ͕ϦδΣΫτ͞Εͨ w։ൃΞϓϦ͕ɺͳΓ͢·͠ೝఆ͞Εͨ wύοέʔδ͕ࣅ͍ͯͨ w4UPSF৘ใΛ1SPEVDUͱಉ͡ͷ࢖͍ͬͯͨ wυϝΠϯূ໌ͱ͔ɺ1MBZ$POTPMFͷεΫγϣΛϝʔϧͰૹͬͯ߅ٞ

  50. ։ൃ༻ΞϓϦͷϦδΣΫτ w(PPHMF͔Β։ൃ༻ΞϓϦ͕ϦδΣΫτ͞Εͨ w։ൃΞϓϦ͕ɺͳΓ͢·͠ೝఆ͞Εͨ wύοέʔδ͕ࣅ͍ͯͨ w4UPSF৘ใΛ1SPEVDUͱಉ͡ͷ࢖͍ͬͯͨ wυϝΠϯূ໌ͱ͔ɺ1MBZ$POTPMFͷεΫγϣΛϝʔϧͰૹͬͯ߅ٞ

  51. ·ͱΊ

  52. ·ͱΊ wΈͯͶͰ͸͜ͷΑ͏ͳྲྀΕͰ՝ۚ؀ڥΛߏஙɾ։ൃͨ͠ w։ൃํ๏͸༷ʑͰ͸͋ΔͷͰɺͦΕͧΕͷ։ൃ؀ڥʹ͋ͬͨํ๏Λ ಋೖͯ͠΋ྑ͍ͱࢥ͏ wҰͭͷಋೖࣄྫͱͯ͠ࢀߟʹ͍͚ͯͨͩ͠Ε͹޾͍Ͱ͢

  53. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠