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

Target SDK Versionを上げない Notification runtime permission対応

Target SDK Versionを上げない Notification runtime permission対応

0c5e92294cc0cfba620641c589db9378?s=128

napplecomputer

June 22, 2022
Tweet

More Decks by napplecomputer

Other Decks in Technology

Transcript

  1. Mobility Technologies Co., Ltd. Target SDK VersionΛ্͛ͳ͍ Notification runtime permissionରԠ

    @napplecomputer
  2. Mobility Technologies Co., Ltd. 2 ▪ @napplecomputer ▪ ͳͬͽʔ ▪

    גࣜձࣾMobility Technologiesॴଐ ▪ λΫγʔΞϓϦGOͷϢʔβʔΞϓϦ ▪ ࠓ೔20೥ͿΓʹচ԰ʹߦ͖·ͨ͠ ࣗݾ঺հ
  3. Mobility Technologies Co., Ltd. AndroidΞϓϦͷ ৽OSରԠ 3

  4. Mobility Technologies Co., Ltd. 4 ▪ ໨త͸3ͭ ▪ ΞϓϦʹ૝ఆ֎ͷڍಈΛͤ͞ͳ͍ͨΊ ▪

    ΞϓϦΛGoogle PlayͰ഑৴Ͱ͖Δঢ়گΛΩʔϓ͢ΔͨΊ ▪ Google PlayͰ͸Target SDK Versionʹର͢Δཁٻ͕͋Γɺظݶ·Ͱ ʹରԠͰ͖ͳ͍ͱ഑৴Ͱ͖ͳ͘ͳΔɻ ▪ ৽ػೳΛऔΓࠐΜͰΞϓϦͷ࢖͍উखΛྑ͘͢ΔͨΊ AndroidΞϓϦͷ৽OSରԠ
  5. Mobility Technologies Co., Ltd. 5 ▪ ҎԼͷެࣜυΩϡϝϯτΛ֬ೝ͢Δ ▪ Migrate apps

    to Android 13 ▪ Android 13 features and changes list ▪ Change (all apps) ▪ Change (apps targeting 13+) ▪ New features and APIs AndroidΞϓϦͷ৽OSରԠ
  6. Mobility Technologies Co., Ltd. 6 ▪ ҎԼͷެࣜυΩϡϝϯτΛ֬ೝ͢Δ ▪ Migrate apps

    to Android 13 ▪ Android 13 features and changes list ▪ Change (all apps) ▪ Change (apps targeting 13+) ▪ New features and APIs AndroidΞϓϦͷ৽OSରԠ
  7. Mobility Technologies Co., Ltd. 7 AndroidΞϓϦͷ৽OSରԠ ▪ ରԠॱং͸4ஈ֊ ▪ Change

    (all apps)ʹରԠ͢Δ ▪ Compile SDK VersionΛ্͛Δ ▪ Target SDK VersionΛ্͛Δ ▪ ৽ػೳΛऔΓࠐΉ
  8. Mobility Technologies Co., Ltd. Notification runtime permission 8

  9. Mobility Technologies Co., Ltd. 9 Notification runtime permission ▪ Android

    OS 13͔Β௨஌͕runtime permissionʹ௥Ճ͞Εͨ ▪ ࠓ·Ͱͷ௨஌ͷ༗ޮɾແޮ͕Permissionʹஔ͖׵ΘΔ ▪ Target SDK Version͕13Ҏ্ͷ৔߹ͱɺTarget SDK Version͕12LҎԼͷ৔߹ Ͱڍಈ͕ҟͳΔ ▪ ϝσΟΞ΍௨࿩ͳͲಛఆͷ௨஌͸Permission͕ͳͯ͘΋දࣔͰ͖Δ ▪ OSΞοϓσʔτͰAndroid OS 13ʹͳͬͨ৔߹ɺطଘͷ௨஌͕༗ޮͳΞϓϦ͸ ௨஌Permission͕ಘΒΕͨঢ়ଶʹͳΔʢ࠷ۙ࢓༷͕େ͖͘มΘͬͨʣ
  10. Mobility Technologies Co., Ltd. 10 Notification runtime permission

  11. Mobility Technologies Co., Ltd. Target SDK Version͕ 13ͷ৔߹ 11

  12. Mobility Technologies Co., Ltd. 12 Target SDK Version͕13ͷ৔߹ ▪ ৽نΠϯετʔϧͷ৔߹ɺ௨ৗͷRuntime

    Permissionͱಉ͡Α͏ʹରԠ͢ Ε͹ྑ͍ ▪ iOS͸Ҏલ͔Β௨஌ͷPermission͕ଘࡏ͍ͯ͠ΔͨΊɺiOS൛͕͋Δ৔߹͸ iOS൛ͷ࣮૷͕ࢀߟʹͳΔ
  13. Mobility Technologies Co., Ltd. 13 Target SDK Version͕13ͷ৔߹ iOS൛ Android൛

  14. Mobility Technologies Co., Ltd. Target SDK Version͕ 12LҎԼͷ৔߹ 14

  15. Mobility Technologies Co., Ltd. 15 Target SDK Version͕12LҎԼͷ৔߹ ▪ ৽نΠϯετʔϧͷΞϓϦ͸

    ▪ PermissionཁٻΛࣗ༝ʹߦ͑ͳ͍ˍ݁ՌΛಘΒΕͳ͍ ▪ ௨஌νϟϯωϧΛ࡞੒ͨ͠ͱ͖ʹࣗಈͰPermissionཁٻ͕ߦΘΕΔ ▪ σόοάπʔϧͱͯ͠ྲྀߦͬͨHyperion͸ΞϓϦ͕ىಈ͢ΔͱࣗಈͰ௨ ஌νϟϯωϧΛ࡞੒͢ΔͨΊɺ͍͖ͳΓPermissionཁٻμΠΞϩά͕ද ࣔ͞ΕΔ͜ͱʹͳΔ… ▪ HyperionΛണ͕͞ͳ͍ͱςετ͠ʹ͍͘…
  16. Mobility Technologies Co., Ltd. 16 Target SDK Version͕12LҎԼͷ৔߹ ▪ λΫγʔΞϓϦGOͰ͸ApplicationͷonCreateͰ௨஌νϟϯωϧΛ࡞੒͍ͯ͠

    ΔͨΊɺΞϓϦىಈ௚ޙ࠷ॳͷActivity͕දࣔ͞ΕΔલʹPermissionཁٻμΠ Ξϩά͕දࣔ͞Εͯ͠·͏… ▪ ଞʹ΋௨஌νϟϯωϧͷଟݴޠରԠ͍ͯ͠Δ৔߹ͳͲ΋஫ҙ͕ඞཁ ▪ ݴޠ੾ସ࣌ͷBroadcastͰ௨஌νϟϯωϧ্໊ॻ͖͢Δ͍ͯ͠ΔͨΊ ▪ ௨஌Permission͕ͳ͍৔߹ɺద੾ͳλΠϛϯάҎ֎Ͱ͸௨஌νϟϯωϧΛ࡞੒ ͠ͳ͍Α͏ʹ͢Δඞཁ͕͋Δ
  17. Mobility Technologies Co., Ltd. 17 Target SDK Version͕12LҎԼͷ৔߹ ▪ PermissionཁٻΛࣗ༝ʹߦ͑ͳ͍ˍ݁ՌΛಘΒΕͳ͍

    ▪ ௨ৗͷPermissionཁٻखॱΛߦ͏ͱPermissionཁٻ͕ߦΘΕͣɺPermission ͕ಘΒΕͳ͔ͬͨͱͯ݁͠Ռ͕ฦͬͯ͘Δ ▪ ௨஌νϟϯωϧΛ࡞੒ͨ͠ࡍͷPermissionཁٻ͸݁Ռ͕ฦͬͯ͜ͳ͍ ▪ PermissionཁٻμΠΞϩά͕දࣔ͞Ε͔ͨͲ͏͔΋Θ͔Βͳ͍ ▪ ઃఆΞϓϦͰ௨஌ઃఆΛoff->on->offʹ੾Γସ͍͑ͯΔͱ௨஌νϟϯωϧΛ ࡞੒ͯ͠΋PermissionཁٻμΠΞϩά͸දࣔ͞Εͳ͍
  18. Mobility Technologies Co., Ltd. 18 ࢼߦࡨޡͨ݁͠Ռ… Target SDK Version͕12LҎԼͷ৔߹

  19. Mobility Technologies Co., Ltd. 19 Target SDK Version͕12LҎԼͷ৔߹ ▪ PermissionཁٻμΠΞϩάදࣔ࣌ʹonPause͕૸ΓɺPermissionཁٻμΠ

    Ξϩάऴྃ࣌ʹonResume͕૸Δ ▪ ௨஌νϟϯωϧ࡞੒௚ޙʹonPause͕ݺ͹ΕΕ͹PermissionཁٻμΠΞϩ ά͕දࣔ͞Ε͓ͯΓɺͦͷޙonResume͕ݺ͹ΕΕ͹PermissionཁٻμΠ Ξϩά͕ดͨ͡ͱ൑அͰ͖ͦ͏
  20. Mobility Technologies Co., Ltd. ·ͱΊ 20

  21. Mobility Technologies Co., Ltd. 21 ▪ ௨஌Λදࣔ͢ΔͨΊʹPermission͕ඞཁͳͬͨ ▪ Target SDK

    Version͸্͛ΒΕΔͳΒ্͛Δ΄͏͕ίϯτϩʔϧ͠΍͍͢ ▪ Ͳ͏ͯ͠΋Target SDK VersionΛ্͛Δͷ͕೉͍͠৔߹ɺTarget SDK VersionΛ্͛ͳͯ͘΋ؤுΕ͹ରԠͰ͖Δ ·ͱΊ